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/ * 配置参考: 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
},
},
}),
],
},
}, },
}; };

Loading…
Cancel
Save