Commit 2caf822
authored
fix: Rspack dev gets stuck after removing a page (#80555)
Rspack's incremental build algorithm causes a situation where deleted
entries in dynamic entries still get built.
If a page is deleted, an infinite loop occurs in the corresponding
`next-app-loader`, causing the entire compilation to hang.
The root cause of the hang lies in `const resolvedPagePath = await
resolver(matchedPagePath)` failing to resolve `resolvedPagePath`,
preventing the loop from exiting.
When `resolvedPagePath` doesn't exist, we should immediately throw an
Error. This logic would also benefit webpack, as scenarios where pages
are deleted during the execution of `next-app-loader` do occur.1 parent e2e82e9 commit 2caf822
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
| 712 | + | |
712 | 713 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| |||
0 commit comments