gitscope
← marzneshin / v0.2.1 / app/dashboard/vite.config.ts
https://dev.kronoz.win/r/marzneshin.git
app/dashboard/vite.config.ts · TypeScript
Blame Raw
 1import react from '@vitejs/plugin-react';
 2import { defineConfig, splitVendorChunkPlugin } from 'vite';
 3import svgr from 'vite-plugin-svgr';
 4import { visualizer } from 'rollup-plugin-visualizer';
 5import tsconfigPaths from 'vite-tsconfig-paths';
 6
 7// https://vitejs.dev/config/
 8export default defineConfig({
 9  build: {
10    chunkSizeWarningLimit: 100,
11    rollupOptions: {
12      onwarn(warning, warn) {
13        if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
14          return
15        }
16        warn(warning)
17      }
18    }
19  },
20  plugins: [
21    tsconfigPaths(),
22    react({
23      include: '**/*.tsx',
24    }),
25    svgr(),
26    visualizer(),
27    splitVendorChunkPlugin(),
28  ],
29});