This commit is contained in:
2025-10-17 14:34:50 +08:00
parent cdfee67960
commit 4c4851b393
7 changed files with 81 additions and 10 deletions

View File

@@ -151,6 +151,7 @@ export default defineConfig({
},
},
build: {
target: 'es2022',
rollupOptions: {
input: {
config: path.resolve(__dirname, 'index.html'),
@@ -163,7 +164,7 @@ export default defineConfig({
},
},
sourcemap: isProd ? false : 'inline', // 生产环境关闭 sourcemap开发环境使用 inline
minify: isProd ? 'terser' : false, // 生产环境使用 terser 混淆,开发环境不混淆
minify: 'terser', // 强制进行混淆,避免全局变量被污染的问题
...(isProd && {
terserOptions: {
compress: {