-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
39 lines (39 loc) · 939 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
module.exports = {
transpileDependencies: ['vue-class-component'],
configureWebpack: {
performance: {
hints: 'warning',
// 入口起点的最大体积
maxEntrypointSize: 50000000,
// 生成文件的最大体积
maxAssetSize: 30000000,
// 只给出 js 文件的性能提示
assetFilter: function (assetFilename) {
return assetFilename.endsWith('.js')
}
}
},
chainWebpack: config => {
config
.entry('index')
.add('@babel/polyfill')
.end();
const scssRes = config.module.rule('scss').oneOfs.store;
scssRes.forEach(item => {
item
.use("sass-resource-loader")
.loader('sass-resources-loader')
.options({
resources: './src/styles/_var.scss'
}).end();
})
},
publicPath: './',
devServer: {
// hot:true,
host: 'localhost',
port: 8888,
open: true,
// https: false
}
}