Files
iMES_Vue/vue.config.js
2026-02-06 18:43:18 +08:00

55 lines
1.3 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// const webpack = require("webpack");
module.exports = {
productionSourceMap: false,
lintOnSave: false,
publicPath: './',
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 = 'iMES-您的新一代工厂管家【商业版】';
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 体积保持在指定大小限制以上
// })
// ]
// }
};