-
Notifications
You must be signed in to change notification settings - Fork 227
/
vue.config.js
executable file
·51 lines (49 loc) · 988 Bytes
/
vue.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
46
47
48
49
50
51
const path = require('path');
function resolve(dir = '') {
return path.join(__dirname, './src', dir);
}
module.exports = {
productionSourceMap: false,
devServer: {
proxy: {
'/api': {
target: 'http://127.0.0.1:3000',
changeOrigin: true,
pathRewrite: {
'/api': ''
}
}
}
},
chainWebpack: config => {
config.plugins.delete('prefetch');
config.plugins.delete('preload');
},
configureWebpack: {
resolve: {
alias: {
core: resolve('core')
}
},
optimization: {
runtimeChunk: {
name: entrypoint => `runtime~${entrypoint.name}`
},
splitChunks: {
minChunks: 2,
minSize: 20000,
maxAsyncRequests: 20,
maxInitialRequests: 30,
name: false
}
}
},
css: {
loaderOptions: {
sass: {
data:
'@import "@/assets/scss/_var.scss";@import "@/assets/scss/_mixin.scss";'
}
}
}
};