-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathvite.config.js
More file actions
50 lines (48 loc) · 973 Bytes
/
vite.config.js
File metadata and controls
50 lines (48 loc) · 973 Bytes
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
import { defineConfig } from 'vite'
import { resolve } from 'path'
import terser from '@rollup/plugin-terser'
import autoprefixer from 'autoprefixer'
export default defineConfig({
root: './src',
base: '/assets/',
build: {
outDir: '../assets',
emptyOutDir: true,
sourcemap: false,
rollupOptions: {
input: {
main: resolve(__dirname, 'src/main.js')
},
output: {
entryFileNames: 'main.min.js',
assetFileNames: 'main.min.css'
},
external: []
},
minify: 'terser',
terserOptions: {
compress: {
drop_console: false,
drop_debugger: true
},
format: {
comments: false
}
}
},
css: {
preprocessorOptions: {
scss: {}
},
postcss: {
plugins: [
autoprefixer()
]
}
},
resolve: {
alias: {
'iDisqus.css': resolve(__dirname, './node_modules/disqus-php-api/dist/iDisqus.min.css')
}
}
})