feat(rsc): add ability to access client entry URL from ssr environment and deprecate loadBootstrapScriptContent - #1360
Merged
Merged
Conversation
Co-authored-by: OpenCode <noreply@opencode.ai>
/ssr
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
marked this pull request as ready for review
July 30, 2026 08:25
/ssr/ssr runtime
/ssr runtimeloadBootstrapScriptContent
loadBootstrapScriptContentloadBootstrapScriptContent
6 tasks
dai-shi
added a commit
to wakujs/waku
that referenced
this pull request
Aug 6, 2026
Fixes #2238. The vite:preloadError listener lived inside entry.browser.tsx, so it could not cover a load failure of the entry chunk itself, and the plugin-rsc bootstrap import() dispatches no event on rejection. - Register the listener from the bootstrap preamble, before the entry import runs - Update @vitejs/plugin-rsc to 0.5.33 and build the bootstrap import from getClientEntryUrl() (vitejs/vite-plugin-react#1360), dispatching vite:preloadError from its catch like Vite's __vitePreload does - Allow one recovery reload per build id, tracked in sessionStorage. Without the cap a broken build reloads forever. If storage is blocked, recovery is skipped instead of looping - Wait for DOMContentLoaded before reloading, since the entry chunk fails while the HTML is still streaming Behavior notes: recovery is production only (dev no longer reloads on vite:preloadError), and the one retry per build id can be spent by a transient chunk failure.
lqhuang
pushed a commit
to lqhuang/waku
that referenced
this pull request
Aug 7, 2026
…#2240) Fixes wakujs#2238. The vite:preloadError listener lived inside entry.browser.tsx, so it could not cover a load failure of the entry chunk itself, and the plugin-rsc bootstrap import() dispatches no event on rejection. - Register the listener from the bootstrap preamble, before the entry import runs - Update @vitejs/plugin-rsc to 0.5.33 and build the bootstrap import from getClientEntryUrl() (vitejs/vite-plugin-react#1360), dispatching vite:preloadError from its catch like Vite's __vitePreload does - Allow one recovery reload per build id, tracked in sessionStorage. Without the cap a broken build reloads forever. If storage is blocked, recovery is skipped instead of looping - Wait for DOMContentLoaded before reloading, since the entry chunk fails while the HTML is still streaming Behavior notes: recovery is production only (dev no longer reloads on vite:preloadError), and the one retry per build id can be spent by a transient chunk failure.
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.
This PR adds
getClientEntryUrlas@vitejs/plugin-rsc/ssrruntime API and deprecate oldimport.meta.viteRsc.loadBootstrapScriptContentAPI.