fix
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user