Browse Source

关闭线上环境log

dongming
mk 9 months ago
parent
commit
8661dd0806
  1. 23
      vue.config.js

23
vue.config.js

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

Loading…
Cancel
Save