-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
36 lines (36 loc) · 956 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const { appConfig } = require("./package.json");
const viteMainJs = require("vite-main-js");
const tailwind = require("tailwindcss");
const postcssImport = require("postcss-import");
const autoPreprocess = require("svelte-preprocess");
const { svelte } = require("@sveltejs/vite-plugin-svelte");
const { port } = appConfig;
const production = process.env.NODE_ENV === "production";
module.exports = {
server: {
port: port,
},
build: {
cssCodeSplit: false,
},
optimizeDeps: {
exclude: ["@roxi/routify"],
},
resolve: {
dedupe: ["@roxi/routify"],
},
plugins: [
viteMainJs(),
svelte({
preprocess: [
autoPreprocess({
postcss: {
plugins: [tailwind({}), postcssImport],
},
}),
],
emitCss: true,
hot: !production,
}),
],
};