mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 06:20:50 +00:00
improve: 打包插件
This commit is contained in:
parent
d25d82fe97
commit
a92cc3a872
@ -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'))
|
||||
|
||||
@ -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];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user