common.ts 546 B

123456789101112131415161718192021222324252627
  1. import { presetTypography, presetUno } from 'unocss';
  2. import UnoCSS from 'unocss/vite';
  3. import { type UserConfig } from 'vite';
  4. const commonConfig: UserConfig = {
  5. server: {
  6. host: true,
  7. },
  8. esbuild: {
  9. drop: ['console', 'debugger'],
  10. },
  11. build: {
  12. reportCompressedSize: false,
  13. chunkSizeWarningLimit: 1500,
  14. rollupOptions: {
  15. // TODO: Prevent memory overflow
  16. maxParallelFileOps: 3,
  17. },
  18. },
  19. plugins: [
  20. UnoCSS({
  21. presets: [presetUno(), presetTypography()],
  22. }),
  23. ],
  24. };
  25. export { commonConfig };