-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
41 lines (39 loc) · 843 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
37
38
39
40
41
import {defineConfig, splitVendorChunkPlugin} from "vite"
import preact from "@preact/preset-vite"
export default defineConfig({
plugins: [
preact(),
splitVendorChunkPlugin(),
],
publicDir: "src/public",
resolve: {
alias: {
"react": "preact/compat",
"react-dom": "preact/compat"
}
},
build: {
chunkSizeWarningLimit: 1024,
rollupOptions: {
output: {
inlineDynamicImports: false
},
},
},
manualChunks: {
lodash: ["lodash"]
},
css: {
modules: {
generateScopedName: "[hash:base64:12]",
}
},
json: {
namedExports: false,
},
esbuild: {
logOverride: {
"this-is-undefined-in-esm": "silent"
}
}
})