-
Notifications
You must be signed in to change notification settings - Fork 2
/
vue.config.js
51 lines (49 loc) · 1.14 KB
/
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')
const Check = require('./plugins/check')
const Voives = require('./plugins/voices')
process.env.VUE_APP_LAST_UPDATE = Date.now()
/**
* @typedef { import("@vue/cli-service").ProjectOptions } Options
* @type { Options }
*/
module.exports = {
productionSourceMap: false,
css: {
loaderOptions: {
stylus: {
stylusOptions: {
import: [path.join(__dirname, './setting/color.styl')]
}
}
}
},
configureWebpack: () => {
return {
plugins: [
new Check(),
new Voives()
],
performance: {
hints: false
},
optimization: {
splitChunks: {
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // 只打包初始时依赖的第三方
},
corejs: {
name: 'chunk-corejs', // 单独将 core-js 拆包
priority: 15,
test: /[\\/]node_modules[\\/]core-js[\\/]/
}
}
}
}
}
}
}