-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
73 lines (69 loc) · 1.56 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
68
69
70
71
72
73
import type { UserConfig, UserConfigFn } from 'vite';
const config: UserConfigFn = (environment) => {
if (environment.command === 'build') {
1;
}
const configSet: UserConfig = {
css: {
modules: false,
},
base: '/squeaker/',
build: {
outDir: 'docs',
minify: 'terser',
rollupOptions: {
// output: {
// interop: 'esModule',
// format: 'esm',
// esModule: true,
// compact: true,
// minifyInternalExports: true,
// },
},
terserOptions: {
compress: {
// drop_console: true,
// dead_code: true,
// booleans: true,
// booleans_as_integers: true,
// evaluate: true,
// arguments: true,
// // inline: true,
// loops: true,
// module: true,
// computed_props: true,
// directives: true,
// side_effects: true,
// arrows: true,
// join_vars: true,
// keep_fargs: false,
// conditionals: true,
// collapse_vars: true,
// expression: false,
// unsafe: true,
// unsafe_arrows: true,
// unsafe_comps: true,
// unsafe_math: true,
// unsafe_Function: true,
// unsafe_regexp: true,
// unsafe_proto: true,
// unsafe_undefined: true,
// comparisons: true,
// unsafe_methods: true,
passes: 3,
// keep_infinity: false,
// properties: true,
// pure_getters: true,
// reduce_vars: true,
// unused: true,
// toplevel: true,
},
module: true,
ecma: 2020,
},
target: 'esnext',
},
};
return configSet;
};
export default config;