-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js.bak
53 lines (51 loc) · 1.28 KB
/
vue.config.js.bak
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
52
53
// const webpack = require("webpack");
module.exports = {
productionSourceMap: false,
lintOnSave: false,
devServer: {
port: 9990,
overlay: {
warning: false,
errors: false
}
},
css: {
//查看CSS属于哪个css文件
sourceMap: true
},
configureWebpack: {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
},
]
}
},
//https://cli.vuejs.org/zh/guide/html-and-static-assets.html#html
chainWebpack: (config) => {
// 移除 prefetch 插件
config.plugins.delete('prefetch');
//自下定义title
config.plugin('html').tap((args) => {
args[0].title = 'vol3.0版本';
return args;
});
// 或者
// 修改它的选项:
// config.plugin('prefetch').tap(options => {
// options[0].fileBlacklist = options[0].fileBlacklist || []
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
// return options
// })
}
// configureWebpack: {
// plugins: [
// new webpack.optimize.MinChunkSizePlugin({
// minChunkSize: 100000 // 通过合并小于 minChunkSize 大小的 chunk,将 chunk 体积保持在指定大小限制以上
// })
// ]
// }
};