Repository navigation
Conversation
h-a-n-a
force-pushed
the
fix/lazy-redirect-to-built-chunk
branch
from
September 17, 2026 06:57
0f16ec9 to
1b9850a
Compare
…iling it on reload Claude-Session: https://claude.ai/code/session_01P1jv1ZxTBDDWFXbV6YA3Hm
…n it is safe A full-build chunk runs and re-registers every module in it, so a client that already holds one of those modules from a lazy payload would run it twice. The redirect is now allowed only for a client that took no lazy payload and saw no full build since it connected. The bundle state is read after the running build finished, because an edit marks the output stale only when its HMR task ends. Before, a request during that task was answered with the pre-edit chunk. Also: the redirect lookup is inside the middleware's try/catch, and the proxy stubs are left out of the chunk map. Claude-Session: https://claude.ai/code/session_01P1jv1ZxTBDDWFXbV6YA3Hm
h-a-n-a
force-pushed
the
fix/lazy-redirect-to-built-chunk
branch
from
September 18, 2026 06:34
43e9dd6 to
ffd188b
Compare
The map is keyed by rolldown's module id, which keeps backslashes on Windows. Claude-Session: https://claude.ai/code/session_01P1jv1ZxTBDDWFXbV6YA3Hm
h-a-n-a
marked this pull request as ready for review
September 21, 2026 07:29
Member
|
Just in case, does this require a specific version of Rolldown? I guess no |
Member
|
Even if 302 is used, the browser treats the module as a different instance, would that be fine? |
Member
Author
I guess no, but this is actually built and tested on top of rolldown/rolldown#11000. We can delay it until it has been released. Let me draft it. |
Member
Author
This is only supposed to work on page refresh (instead of compiling all over again, it redirects the requests to already served chunks), so i think it will be fine. |
h-a-n-a
marked this pull request as draft
September 30, 2026 01:32
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redirect the lazy request to the already-built lazy route instead of recompiling it again on reload.