Skip to content

Commit dc450cd

Browse files
authored
fix: 修复vite6.0.6出现打包时debugger为自动删除的问题 (#232)
1 parent 0522777 commit dc450cd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"typescript": "~5.7.2",
122122
"unocss": "^0.65.3",
123123
"unplugin-vue-components": "~0.28.0",
124-
"vite": "~6.0.5",
124+
"vite": "~6.0.6",
125125
"vite-plugin-checker": "~0.8.0",
126126
"vite-plugin-inspect": "^0.10.6",
127127
"vite-plugin-mkcert": "^1.17.6",

vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
141141
include: ['lodash-es', 'ant-design-vue/es/locale/zh_CN', 'ant-design-vue/es/locale/en_US'],
142142
},
143143
esbuild: {
144-
pure: VITE_DROP_CONSOLE === 'true' ? ['console.log', 'debugger'] : [],
144+
pure: VITE_DROP_CONSOLE === 'true' ? ['console.log'] : [],
145+
drop: VITE_DROP_CONSOLE === 'true' ? ['debugger'] : [],
145146
supported: {
146147
// https://github.com/vitejs/vite/pull/8665
147148
'top-level-await': true,

0 commit comments

Comments
 (0)