-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
60 lines (59 loc) · 1.3 KB
/
Copy pathvite.config.js
File metadata and controls
60 lines (59 loc) · 1.3 KB
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { visualizer } from 'rollup-plugin-visualizer'
import terser from '@rollup/plugin-terser'
export default defineConfig({
plugins: [
vue(),
visualizer({
filename: 'bundle-stats.html',
open: false,
gzipSize: true
})
],
define: {
'process.env': {}
},
build: {
outDir: 'js/dist',
lib: {
entry: path.resolve(__dirname, 'js/main.js'),
name: 'VereinApp',
formats: ['es'],
fileName: (format) => `nextcloud-verein.mjs`
},
rollupOptions: {
external: [],
output: {
globals: {},
inlineDynamicImports: true
},
plugins: [
terser({
compress: {
drop_console: true,
drop_debugger: true,
passes: 3,
pure_funcs: ['console.log', 'console.info', 'console.debug'],
unsafe: true,
unsafe_comps: true,
unsafe_math: true
},
mangle: {
properties: false
},
format: {
comments: false
}
})
]
},
minify: false // Use rollup-plugin-terser instead
},
resolve: {
alias: {
'@': path.resolve(__dirname, './js')
}
}
})