-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.js
50 lines (49 loc) · 1.14 KB
/
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
42
43
44
45
46
47
48
49
50
import { defineConfig } from "vite"
import { resolve } from "path"
import vue from "@vitejs/plugin-vue2"
import legacy from "@vitejs/plugin-legacy"
// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [
vue(),
legacy({
targets: ["defaults", "not IE 11"],
}),
],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, "index.html"),
concordances: resolve(__dirname, "concordances.html"),
},
},
outDir: "dist-temp",
chunkSizeWarningLimit: 1000,
},
resolve: {
alias: {
// This allows relative imports starting with @/ instead of absolute imports
"@": resolve(__dirname, "./src"),
},
},
server: {
port: 8080,
},
// Required to suppress warnings regarding @charset tags in compiled CSS
// See also: https://github.com/vitejs/vite/discussions/5079
css: {
postcss: {
plugins: [{
postcssPlugin: "internal:charset-removal",
AtRule: {
charset: (atRule) => {
if (atRule.name === "charset") {
atRule.remove()
}
},
},
}],
},
},
})