blob: d64999957826e2d6a9a544475bf224fcf135154a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
build: {
rolldownOptions: {
output: {
codeSplitting: {
// Do not pull a group's dependencies into that group. React and the
// router must stay in their own cacheable chunks.
includeDependenciesRecursively: false,
groups: [
{
name: 'react-vendor',
test: /node_modules[\\/](react|react-dom|scheduler)[\\/]/,
},
{
name: 'router-vendor',
test: /node_modules[\\/]react-router(-dom)?[\\/]/,
},
],
},
},
},
},
})
|