代码拉取完成,页面将自动刷新
同步操作将从 LEADSHOP开源商城系统/leadshop后台VUE源码 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* @Author: fjt
* @Date: 2021-07-07 21:25:33
* @LastEditors: fjt
* @LastEditTime: 2021-07-20 23:12:10
*/
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
lintOnSave: false,
pages: {
index: {
entry: './src/main.js',
template: './public/index.html',
filename: 'index.html',
title: 'leadshop',
chunks: ['chunk-leadshop', 'chunk-commom', 'chunk-echarts', 'chunk-elementUi', 'index']
}
},
devServer: {
open: true,
overlay: {
warnings: true,
errors: true
}
},
publicPath: process.env.NODE_ENV === 'production' ? '/assets/admin' : '/',
filenameHashing: true,
productionSourceMap: false,
configureWebpack: config => {
config.optimization.splitChunks = {
chunks: 'all',
maxInitialRequests: 4,
cacheGroups: {
common: {
name: 'chunk-commom',
minChunks: 2,
priority: -20,
chunks: 'initial',
reuseExistingChunk: true
},
leadshop: {
name: 'chunk-leadshop',
test: /[\\/]node_modules[\\/]/,
priority: -10
},
echarts: {
name: 'chunk-echarts',
test: /[\\/]node_modules[\\/]_?echarts(.*)/,
priority: 10
},
elementUi: {
name: 'chunk-elementUi',
test: /[\\/]node_modules[\\/]_?element-ui(.*)/,
priority: 10
}
}
};
if (process.env.BUNDLE_ANALYZER === 'YES') {
return {
plugins: [new BundleAnalyzerPlugin()]
};
}
},
chainWebpack: config => {
// 移除 prefetch 插件
config.plugins.delete('prefetch-index');
// 移除 preload 插件,避免加载多余的资源
config.plugins.delete('preload-index');
config.plugin('define').tap(args => {
return args;
});
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。