Skip to content

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
solidjs:nextfrom
brenelz:update-solid-rc-1
Closed

Update solid to 2.0.0-rc.1 and adapt fileRoutes to the new lazy() signature#586
brenelz wants to merge 1 commit into
solidjs:nextfrom
brenelz:update-solid-rc-1

Conversation

@brenelz

@brenelz brenelz commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump solid-js / @solidjs/web / babel-preset-solid devDependencies to ^2.0.0-rc.1 and raise the peer ranges to ^2.0.0-rc.1.
  • Adapt fileRoutes to rc.1's new lazy() signature: moduleUrl moved from the second argument to the third (lazy(fn, options?, moduleUrl?)), so the code-split branch now calls lazy(ref.import, undefined, ref.src).

The peer floor bump is required, not cosmetic: on rc.0, lazy() takes moduleUrl second, 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

  • Full suite green on rc.1: 348 client tests, 28 server tests, type checks, build.
  • Reproduced the breakage end-to-end in a fullstack SSR test app pinned to solid 2.0.0-rc.1 with the published @solidjs/router@2.0.0-next.16: production SSR logs lazy() used in SSR without a moduleUrl … the component will load late during hydration and the route chunks are absent from the SSR HTML.
  • With this branch linked in, the warning is gone, the SSR HTML preloads the route chunks (index-*.js, users-*.js), both / and /users/1 render, and hydration works (event replay + counter interactivity verified in the browser).

Patch changeset included, following the rc.0 bump convention.

🤖 Generated with Claude Code

…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-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cdab400

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/router Patch

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​solidjs/​web@​2.0.0-rc.1961008397100
Addedbabel-preset-solid@​2.0.0-rc.11001009096100
Addedsolid-js@​2.0.0-rc.11001009596100

View full report

@brenelz brenelz closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant