You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yxsc-net6/vol-vue3/vue.config.js.bak

54 lines
1.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// 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 体积保持在指定大小限制以上
// })
// ]
// }
};