mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-25 05:25:04 +00:00
feat: esbuild增加不同开发模式下对cnosole debugger的处理 (#2907)
This commit is contained in:
@@ -2,12 +2,12 @@ import { presetTypography, presetUno } from 'unocss';
|
||||
import UnoCSS from 'unocss/vite';
|
||||
import { type UserConfig } from 'vite';
|
||||
|
||||
const commonConfig: UserConfig = {
|
||||
const commonConfig: (mode: string) => UserConfig = (mode) => ({
|
||||
server: {
|
||||
host: true,
|
||||
},
|
||||
esbuild: {
|
||||
drop: ['debugger'],
|
||||
drop: mode === 'procution' ? ['console', 'debugger'] : [],
|
||||
},
|
||||
build: {
|
||||
reportCompressedSize: false,
|
||||
@@ -22,6 +22,6 @@ const commonConfig: UserConfig = {
|
||||
presets: [presetUno(), presetTypography()],
|
||||
}),
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
export { commonConfig };
|
||||
|
Reference in New Issue
Block a user