Circular dependency hangs watch option
apietrzaklea opened this issue · 0 comments
apietrzaklea commented
Rollup Version
4.12.0
Operating System (or Browser)
Windows
Node Version (if applicable)
18.16.0
Link To Reproduction
https://github.com/apietrzaklea/rollup-watch-hangs
Expected Behaviour
Watch correctly handles circular dependencies
Actual Behaviour
Currently when circular dependency happens between more than two files, rollup hangs when watcher wants rebuild library.
In example project run: "npm run start" and when build is done, try to change "file2.ts" for example.
Based on my investigation fetchModule
enters with isPreload === true
and goes into handleExistingModule
. That ends with await loadPromise
and freeze.
It does not happen when first build is done.