const path = require('path')
|
const resolve = dir => {
|
return path.join(__dirname, dir)
|
}
|
module.exports = {
|
publicPath: './',
|
chainWebpack: config => {
|
config.resolve.alias
|
.set('_c', resolve('src/components')) // key,value自行定义,比如.set('@@', resolve('src/components'))
|
},
|
lintOnSave: false,
|
chainWebpack: (config) => {
|
// 移除 prefetch 插件
|
config.plugins.delete('prefetch');
|
//自下定义title
|
config.plugin('html').tap((args) => {
|
args[0].title = '太重数据统计';
|
|
return args;
|
});
|
|
// 或者
|
// 修改它的选项:
|
// config.plugin('prefetch').tap(options => {
|
// options[0].fileBlacklist = options[0].fileBlacklist || []
|
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
|
// return options
|
// })
|
}
|
}
|