fix: exclude automerge-repo-react-hooks from automerge chunk to fix React context loading order
This commit is contained in:
parent
7f1315c2a8
commit
afc3a4fb7f
|
|
@ -143,7 +143,9 @@ export default defineConfig(({ mode }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automerge - CRDT sync library
|
// 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';
|
return 'automerge';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue