improve: 打包插件

This commit is contained in:
From-wh 2023-04-10 18:38:44 +08:00
parent d25d82fe97
commit a92cc3a872
2 changed files with 1 additions and 5 deletions

View File

@ -71,7 +71,6 @@ export default {
}
},
getVersion() {
console.log(this.$route, 'this.$route.path', `${setting.routePre}/login`);
this.isVersion = false;
if (this.$route.path !== `${setting.routePre}/login` && this.$route.path !== '/') {
if ((Local.get('version') && Local.get('version') !== config.version) || !Local.get('version'))

View File

@ -37,10 +37,8 @@ module.exports = {
// 如果你不需要使用eslint,把lintOnSave设为false即可
lintOnSave: false,
// 打包优化
// 打包优化
configureWebpack: (config) => {
const pluginsPro = [new BundleAnalyzerPlugin()];
const pluginsPro = [];
pluginsPro.push(
// js文件压缩
new UglifyJsPlugin({
@ -55,7 +53,6 @@ module.exports = {
parallel: true, //使用多进程并行运行来提高构建速度。默认并发运行数:os.cpus().length - 1。
}),
);
if (process.env.NODE_ENV === 'production') {
config.plugins = [...config.plugins, ...pluginsPro];
}