打包去掉log

This commit is contained in:
刘玉霞 2024-07-12 15:31:18 +08:00
parent 6da3805f64
commit 387d1d9410

View File

@ -63,6 +63,17 @@ const viteConfig = ({ mode }: ConfigEnv): UserConfig => {
outDir: VITE_OUT_DIR,
emptyOutDir: true,
chunkSizeWarningLimit: 1500,
terserOptions: {
compress: {
keep_infinity: true,
// Used to delete console in production environment
drop_console: true,
drop_debugger: true,
},
output: {
comments: true, // 去掉注释内容
},
},
rollupOptions: {
output: {
manualChunks: {