๐Ÿ“ฆ lencx / z

๐Ÿ“„ vite.config.ts ยท 25 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
  plugins: [reactRefresh(), tsconfigPaths()],
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          lodash: ['lodash'],
          react: [
            'react',
            'react-dom',
            'react-helmet-async',
            'react-router-dom',
            'recoil',
          ],
          graphql: ['@apollo/client', 'graphql'],
        },
      },
    },
  },
});