Skip to content

Commit b1e43d7

Browse files
fix(performance): add react-dom/client to vendor-react chunk
Rollup treats subpath imports as separate module IDs; without explicitly including react-dom/client the subpath resolves into a separate chunk, splitting the React vendor bundle and defeating cache stability.
1 parent 0e10966 commit b1e43d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig({
2121
rollupOptions: {
2222
output: {
2323
manualChunks: {
24-
'vendor-react': ['react', 'react-dom'],
24+
'vendor-react': ['react', 'react-dom', 'react-dom/client'],
2525
'vendor-wagmi': ['wagmi', 'viem'],
2626
'vendor-tanstack': ['@tanstack/react-query', '@tanstack/react-router'],
2727
'vendor-chakra': ['@chakra-ui/react'],

0 commit comments

Comments
 (0)