-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.js
38 lines (37 loc) · 874 Bytes
/
vite.config.js
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
// vite.config.js
import {
defineConfig
} from 'vite';
export default defineConfig({
root: 'src',
server: {
watch: {
include: ['src/**/**'],
exclude: ['node_modules']
},
},
build: {
outDir: 'assets',
emptyOutDir: false,
rollupOptions: {
input: {
frontend: 'src/js/frontend.js',
// TODO: Refactor the admin scripts to not need external libraries.
admin: 'src/js/admin.js',
},
output: {
dir: 'assets',
entryFileNames: 'js/[name].js',
chunkFileNames: 'js/[name].js',
assetFileNames: 'css/[name].[ext]',
},
},
},
resolve: {
alias: {
'@': '/src'
}
},
// CSS options
css: {},
})