chore(seller): 清理死代码与失效机制,生产构建剥离 console

- 删除零引用组件 main-components/message-tip.vue
- 清理 113 处 no-unused-vars(重点 goodsOperationSec 20+ 项、ossManage 25 项,含死代码链级联删除;renovation 的 ModelForm 为 vue-eslint-parser 误报,保留并核实)
- stores/app.js 移除只写不读的死字段(currNavTitle/menuTheme/themeColor/isFullScreen/messageCount/currentPageName/currentPath)及失效的 cachePage/dontCache 缓存页机制(无 keep-alive 消费方),同步清理 util.js/App.vue/Main.vue/shrinkable-menu/tags-page-opened 的调用点
- 删除 30 处 console.log 调试残留;生产构建 terser 配置 drop_console 兜底
This commit is contained in:
lifenlong
2026-10-14 20:31:25 +08:00
parent 2a2c3f8174
commit 92dd179525
47 changed files with 20 additions and 1233 deletions

View File

@@ -112,6 +112,14 @@ module.exports = {
args[0].cdn = { css: [], js: [] };
return args;
});
if (enableProduction) {
// 生产构建剥离 console.*,防止调试日志残留上线
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.compress = args[0].terserOptions.compress || {};
args[0].terserOptions.compress.drop_console = true;
return args;
});
}
},
pluginOptions: {
"style-resources-loader": {