-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.ts
32 lines (29 loc) · 884 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
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
base: `./`,
plugins: [vue()],
build: {
// REF https://cn.vitejs.dev/config/build-options.html#build-minify
minify: false,
rollupOptions: {
input: {
preload: './src/preload.ts',
},
output: {
// format: 'iife',
format: 'cjs',
// entryFileNames: '[name].js',
entryFileNames: chunkInfo => {
switch (chunkInfo.name) {
case 'preload':
return '[name].js';
default:
return 'assets/[name]-[hash].js';
}
},
},
},
},
});