mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-06 20:28:00 +00:00
28 lines
604 B
TypeScript
28 lines
604 B
TypeScript
import { presetTypography, presetUno } from 'unocss';
|
|
import UnoCSS from 'unocss/vite';
|
|
import { type UserConfig } from 'vite';
|
|
|
|
const commonConfig: (mode: string) => UserConfig = (mode) => ({
|
|
server: {
|
|
host: true,
|
|
},
|
|
esbuild: {
|
|
drop: mode === 'procution' ? ['console', 'debugger'] : [],
|
|
},
|
|
build: {
|
|
reportCompressedSize: false,
|
|
chunkSizeWarningLimit: 1500,
|
|
rollupOptions: {
|
|
// TODO: Prevent memory overflow
|
|
maxParallelFileOps: 3,
|
|
},
|
|
},
|
|
plugins: [
|
|
UnoCSS({
|
|
presets: [presetUno(), presetTypography()],
|
|
}),
|
|
],
|
|
});
|
|
|
|
export { commonConfig };
|