-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (35 loc) · 929 Bytes
/
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
import { ALL_DEPS } from './build/all-pkgs.js'
import { mergeConfig } from './build/defaultConfig.js'
// https://vitejs.dev/config/
export default mergeConfig({
base: './',
optimizeDeps: {
exclude: ['vue'],
},
server: {
port: 5174
},
build: {
// outDir: 'docs/dest/designer',
emptyOutDir: false,
rollupOptions: {
input: {
index: '/index.html',
demo: '/demo.html',
},
output: {
manualChunks: (id) => {
const dep = [...ALL_DEPS, '@vue'].find(e => id.includes(`node_modules/${e}/`))
if (dep && dep != 'vue') return dep.replaceAll('/', '-')
}
},
plugins: [
(await import('rollup-plugin-visualizer')).visualizer(),
]
}
},
plugins: [
// (await import('./build/plugins/rollup-plugin-transform-html')).default(),
(await import('vite-plugin-pages')).default({ dirs: 'designer/pages' }),
]
})