Compare commits

..

2 Commits

Author SHA1 Message Date
774eaee961 Merge pull request 'update' (#91) from main into prod
Reviewed-on: #91
2026-03-30 14:18:39 +08:00
ping
4039d42428 update 2026-03-30 14:18:03 +08:00
2 changed files with 28 additions and 37 deletions

View File

@ -668,19 +668,10 @@ export default Vue.extend({
}
},
// -
// - 使 getHomePath
goHome() {
console.log('=== goHome 方法开始 ===');
console.log('当前完整URL:', window.location.href);
console.log('当前hostname:', window.location.hostname);
console.log('isNcmatchDomain判断结果:', this.isNcmatchDomain);
console.log('准备跳转的路径:', this.isNcmatchDomain ? '/ncmatchHome/index' : '/homePage/index');
if (this.isNcmatchDomain) {
this.$router.push('/ncmatchHome/index');
} else {
this.$router.push('/homePage/index');
}
const path = this.homePath || getHomePath();
this.$router.push(path);
}
},
})

View File

@ -76,31 +76,31 @@ module.exports = {
}
},
// 生产环境去除console和debugger
optimization: {
minimizer: [
{
apply: (compiler) => {
// 只在生产环境生效
if (process.env.NODE_ENV === 'production') {
const TerserPlugin = require('terser-webpack-plugin')
new TerserPlugin({
terserOptions: {
compress: {
drop_console: true, // 移除console
drop_debugger: true, // 移除debugger
pure_funcs: ['console.log', 'console.info', 'console.warn', 'console.error'] // 移除特定的console方法
},
mangle: true, // 代码混淆
output: {
comments: false // 移除注释
}
}
}).apply(compiler)
}
}
}
]
}
// optimization: {
// minimizer: [
// {
// apply: (compiler) => {
// // 只在生产环境生效
// if (process.env.NODE_ENV === 'production') {
// const TerserPlugin = require('terser-webpack-plugin')
// new TerserPlugin({
// terserOptions: {
// compress: {
// drop_console: true, // 移除console
// drop_debugger: true, // 移除debugger
// pure_funcs: ['console.log', 'console.info', 'console.warn', 'console.error'] // 移除特定的console方法
// },
// mangle: true, // 代码混淆
// output: {
// comments: false // 移除注释
// }
// }
// }).apply(compiler)
// }
// }
// }
// ]
// }
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload