Update solid to 2.0.0-rc.1 and adapt fileRoutes to the new lazy() signature - #586
Closed
brenelz wants to merge 1 commit into
Closed
Update solid to 2.0.0-rc.1 and adapt fileRoutes to the new lazy() signature#586brenelz wants to merge 1 commit into
brenelz wants to merge 1 commit into
Conversation
…nature rc.1 moves lazy()'s moduleUrl to the third argument — lazy(fn, options?, moduleUrl?) — so fileRoutes now passes each entry's src there. The peer floor rides to ^2.0.0-rc.1 because this is not cosmetic: on rc.0 the third argument is silently dropped, losing the moduleUrl that SSR resolves client assets against (dev builds of rc.1 throw on the old string-second-arg call). devDependencies follow (solid-js/@solidjs/web/babel-preset-solid to ^2.0.0-rc.1). Verified end-to-end against a fullstack SSR app: with the published next.16 router on rc.1, production SSR warns "lazy() used in SSR without a moduleUrl" and route chunks are unresolvable; with this change the warning is gone, SSR HTML preloads the route chunks, and hydration works. Full suite green: 348 client, 28 server, types. Patch changeset included. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: cdab400 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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
solid-js/@solidjs/web/babel-preset-soliddevDependencies to^2.0.0-rc.1and raise the peer ranges to^2.0.0-rc.1.fileRoutesto rc.1's newlazy()signature:moduleUrlmoved from the second argument to the third (lazy(fn, options?, moduleUrl?)), so the code-split branch now callslazy(ref.import, undefined, ref.src).The peer floor bump is required, not cosmetic: on rc.0,
lazy()takesmoduleUrlsecond, so the adapted call would silently drop it — losing the URL that SSR resolves client assets against. Conversely, rc.1's dev build throws on the old string-second-argument call.Verification
@solidjs/router@2.0.0-next.16: production SSR logslazy() used in SSR without a moduleUrl … the component will load late during hydrationand the route chunks are absent from the SSR HTML.index-*.js,users-*.js), both/and/users/1render, and hydration works (event replay + counter interactivity verified in the browser).Patch changeset included, following the rc.0 bump convention.
🤖 Generated with Claude Code