fix: exclude automerge-repo-react-hooks from automerge chunk to fix React context loading order

This commit is contained in:
Jeff Emmett 2025-12-25 22:00:05 -05:00
parent 7f1315c2a8
commit afc3a4fb7f
1 changed files with 3 additions and 1 deletions

View File

@ -143,7 +143,9 @@ export default defineConfig(({ mode }) => {
}
// Automerge - CRDT sync library
if (id.includes('node_modules/@automerge')) {
// Note: automerge-repo-react-hooks must NOT be in this chunk as it depends on React
if (id.includes('node_modules/@automerge') &&
!id.includes('automerge-repo-react-hooks')) {
return 'automerge';
}