|
@@ -60,7 +60,7 @@ const vueConfig = {
|
|
|
runtimeCompiler: true, // 动态编译组件
|
|
|
publicPath: BASE_URL,
|
|
|
configureWebpack: {
|
|
|
- optimization: {
|
|
|
+ optimization: isProd() ? {
|
|
|
minimize: true,
|
|
|
minimizer: [new TerserPlugin({
|
|
|
test: /\.js(\?.*)?$/i, //匹配参与压缩的文件
|
|
@@ -73,7 +73,7 @@ const vueConfig = {
|
|
|
},
|
|
|
extractComments: true, //将注释剥离到单独的文件中
|
|
|
})],
|
|
|
- },
|
|
|
+ }:{},
|
|
|
// webpack plugins
|
|
|
plugins: [
|
|
|
// Ignore all locale files of moment.js
|