-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
45 lines (43 loc) · 839 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
39
40
41
42
43
44
45
const { resolve } = require('path');
import vue from '@vitejs/plugin-vue'
module.exports = {
plugins: [vue(),],
root: resolve('./static/src'),
base: '/static/',
server: {
host: 'localhost',
port: 3000,
open: false,
hmr: {
protocol: 'ws',
host: '127.0.0.1',
port: 3001,
clientPort: 3001
},
watch: {
usePolling: true,
disableGlobbing: false,
},
},
resolve: {
alias: {
'vue': 'vue/dist/vue.esm-bundler.js'
},
extensions: ['.js', '.json'],
},
build: {
outDir: resolve('./static/dist'),
assetsDir: '',
manifest: true,
emptyOutDir: true,
target: 'es2015',
rollupOptions: {
input: {
main: resolve('./static/src/js/main.js'),
},
output: {
chunkFileNames: undefined,
},
},
},
};