-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
31 lines (31 loc) · 872 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
module.exports = {
configureWebpack: {
optimization: {
splitChunks: {
chunks: 'all',
},
},
},
/*
*/
// https://github.com/visualfanatic/vue-svg-loader
chainWebpack: config => {
// svg
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.use('vue-loader')
.loader('vue-loader-v16')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader')
// vue-svg-loader removes viewBox by default if width and height are present to optimize size
// override to preserve width and height while allowing it to scale properly if width and height are overridden (e.g. set to 100% to fill container)
// https://github.com/visualfanatic/vue-svg-loader/issues/58
.options({
svgo: {
plugins: [{ removeViewBox: false }],
},
})
},
}