Repository navigation
Conversation
- New start.reloadOnChunkError option, on by default. - The generated client entry of a production build listens for Vite's vite:preloadError event and reloads the page, as SolidStart's reloadOnRouteChunkError does. - A second failure within 10 seconds does not reload again. The last reload time is kept in sessionStorage. - A listener that calls preventDefault() skips the reload. - New chunk-reload mode in the start-ssr e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 228106e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
brenelz
approved these changes
Oct 24, 2026
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.
Adds
start.reloadOnChunkError, on by default. In a production build, the generated client entry reloads the page once when a code-split chunk fails to load, as it does when a deploy replaced the chunk while the page was open. It is the counterpart of SolidStart'sreloadOnRouteChunkError.Changes
vite:preloadErrorevent. Vite fires it when a dynamic import or one of its preloaded files fails.sessionStorage. Without storage the page never reloads. This matches SolidStart's guard.event.preventDefault()skips the reload. The listener is added in the entry body, so one fromstart.clientSetupruns first.preventDefault()itself, so the failed import still rejects and the app's own error handling runs.reloadOnChunkErrorsection. TheclientSetupexample no longer shows a hand-written reload listener.Difference from SolidStart
SolidStart wraps each route's import and returns an empty component, so the router finishes the navigation and the page reloads at the destination URL. The plugin has no router, so it listens for the global event instead. The page reloads at the current URL.
Testing
chunk-reloadmode inexamples/start-ssr/test/run.mjs, 9 assertions. It builds the app, opens it in headless Chrome, deletes the chunk a button loads, and checks:sessionStorage,reloadOnChunkError: false, no chunk carries the listener and a failure does not reload,prod(77) andclient-setup(20) modes ofexamples/start-ssrand theexamples/start-clientsuite (70) still pass.vitest runpasses.The test app awaits the import instead of chaining
.then(onLoad, onError). Vite wraps a chained.then()in its preload helper too, so that rejection handler would catch the error before the event fires.lazy(() => import(...))is not affected.🤖 Generated with Claude Code