|
@ -2,7 +2,7 @@ |
|
|
* 配置参考: https://cli.vuejs.org/zh/config/
|
|
|
* 配置参考: https://cli.vuejs.org/zh/config/
|
|
|
*/ |
|
|
*/ |
|
|
const IS_PROD = ["production", "test"].includes(process.env.NODE_ENV); |
|
|
const IS_PROD = ["production", "test"].includes(process.env.NODE_ENV); |
|
|
const FileManagerPlugin = require("filemanager-webpack-plugin"); |
|
|
const TerserPlugin = require("terser-webpack-plugin"); |
|
|
|
|
|
|
|
|
module.exports = { |
|
|
module.exports = { |
|
|
baseUrl: process.env.NODE_ENV === "production" ? "" : "/epmet-work-pc", |
|
|
baseUrl: process.env.NODE_ENV === "production" ? "" : "/epmet-work-pc", |
|
@ -70,13 +70,18 @@ module.exports = { |
|
|
"@m": "@/img", |
|
|
"@m": "@/img", |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
// plugins: [
|
|
|
optimization: { |
|
|
// new FileManagerPlugin({
|
|
|
minimize: true, |
|
|
// onEnd: {
|
|
|
minimizer: [ |
|
|
// delete: ["./epmet-work-pc.zip"],
|
|
|
new TerserPlugin({ |
|
|
// archive: [{ source: "./epmet-work-pc", destination: "./epmet-work-pc.zip" }],
|
|
|
terserOptions: { |
|
|
// },
|
|
|
compress: { |
|
|
// }),
|
|
|
drop_console: process.env.NODE_ENV === "development" ? false :true, // 移除所有 console
|
|
|
// ],
|
|
|
drop_debugger: process.env.NODE_ENV === "development" ? false :true, // 移除所有 debugger
|
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|