Skip to content

Commit 7251893

Browse files
committed
fix: add React module chunking for Vite to resolve runtime errors
chore: format and narrow down deps (react-dom/) chore: make sure scheduler comes with react too
1 parent 1e79903 commit 7251893

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ export default defineConfig({
7575
if (id.includes('lucide-react')) {
7676
return 'icons'
7777
}
78+
79+
if (
80+
id.includes('node_modules/react-dom/') ||
81+
id.includes('node_modules/react/') ||
82+
id.includes('node_modules/scheduler/')
83+
) {
84+
return 'react'
85+
}
7886
}
7987
},
8088
},

0 commit comments

Comments
 (0)