-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathvite.config.ts
67 lines (65 loc) · 1.5 KB
/
vite.config.ts
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "url";
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 3010,
},
build: {
target: "esnext",
sourcemap: "hidden",
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes("vue/dist/vue")) {
return "v";
}
if (id.includes("vue-") || id.includes("@vue")) {
return "vi";
}
if (id.includes("@sentry")) {
return "s";
}
if (id.includes("@headlessui") || id.includes("@heroicons") || id.includes("@tailwind")) {
return "t";
}
if (id.includes("@firebase")) {
return "f";
}
if (id.includes("@matterlabs")) {
return "m";
}
if (id.includes("/src/composables")) {
return "cm";
}
if (id.includes("/src/components")) {
return "cn";
}
},
},
},
},
optimizeDeps: {
esbuildOptions: {
target: "esnext",
},
},
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
test: {
include: ["./tests/**/**.spec.ts"],
coverage: {
reporter: ["text", "json", "html"],
},
},
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: false,
__INTLIFY_PROD_DEVTOOLS__: false,
},
});