-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvite.config.ts
33 lines (31 loc) · 1.04 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
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig(({ command }) => {
return {
plugins: [
vue(),
],
server: {
watch: {
ignored: ["survey-creator-vue", "survey-vue3-ui"].map((m) => `!**/node_modules/${m}/**`)
}
},
build: {
commonjsOptions: { exclude: ["survey-core", "survey-creator-core"] },
},
optimizeDeps: {
exclude: ["survey-creator-vue", "survey-vue3-ui"],
include: ["survey-creator-core", "survey-core", "survey-creator-core/survey-creator-core.i18n", "survey-core/survey.i18n"]
},
resolve: {
preserveSymlinks: command == "serve" ? false : true,
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
"survey-core": fileURLToPath(new URL('./node_modules/survey-core', import.meta.url)),
"survey-creator-core": fileURLToPath(new URL('./node_modules/survey-creator-core', import.meta.url)),
}
}
}
})