chore(solid): bump to solid-js 2.0.0-rc.4 and @solidjs/vite-plugin 3.0.0-next.35 - #8189
Conversation
…0.0-next.35 Also: - Migrate the webpack example and docs off the deleted babel-preset-solid onto @solidjs/babel-plugin (compiler packages were renamed in rc.3). - Bump @rsbuild/plugin-solid to ^2.0.0-beta.2 so the rsbuild path compiles with the rc-line preset. - Adapt the server function transport to rc.4: function ids resolve from the request url pathname (X-Server-Function header removed), and the client reference derives its url from the configured endpoint. - Wire per-call AbortSignals through Solid's new invoke() channel and re-enable the previously skipped abort e2e tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 0339745
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview6 package(s) bumped directly, 0 bumped as dependents. 🟩 Patch bumps
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Hooray! CodSpeed harness just leveled up!The base and head of this comparison were measured with different runner settings, so their benchmark values are not directly comparable. What changed between base and head:
Re-run the base with the same settings to get a valid performance comparison. Comparing Footnotes |
…enchmark wire protocol - @rsbuild/plugin-solid >= 2.0.0-beta.1 compiles through its own solid loader (native compiler) instead of registering babel-preset-solid, so the babel preset patch never fired and node-target rsbuild bundles were compiled in dom mode, throwing "Client-only API called on the server side" at import. Patch the loader's solid options (generate ssr on node targets, hydratable) alongside the legacy preset patch. - The benchmark server-function request builders still spoke the pre-rc.4 wire protocol (id in the removed X-Server-Function-Id header, bare endpoint url). Ids now ride the url pathname. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We fix the rsbuild SSR server startup crash ("Client-only API called on the server side") by extending the tanstackStart rsbuild plugin to also tap the native solid loader options, not just babel presets. With @rsbuild/plugin-solid@2.0.0-beta.2 defaulting to compiler='native', there is no babel-preset-solid entry in the babel chain to patch, so the SSR generate option was never applied and server bundles were compiled as DOM code. The added code path targets CHAIN_ID.ONE_OF.JS_MAIN > use('solid') and sets { generate: 'ssr', hydratable: true } for node targets, mirroring what the babel path already did for the old compiler.
Tip
✅ We verified this fix by re-running tanstack-solid-start-e2e-basic:test:e2e--rsbuild-ssr.
Suggested Fix changes
diff --git a/packages/solid-start/src/plugin/rsbuild.ts b/packages/solid-start/src/plugin/rsbuild.ts
index b1f25322..4b0e6e19 100644
--- a/packages/solid-start/src/plugin/rsbuild.ts
+++ b/packages/solid-start/src/plugin/rsbuild.ts
@@ -75,6 +75,26 @@ export function tanstackStart(
return babelOptions
})
}
+
+ // Handle native solid compiler (@rsbuild/plugin-solid >= 2.0.0-beta.2
+ // defaults to compiler='native' via solidLoader, not babel-preset-solid).
+ // The solid use lives at RULE.JS > ONE_OF.JS_MAIN > use('solid').
+ if (chain.module.rules.has(CHAIN_ID.RULE.JS)) {
+ const jsRule = chain.module.rule(CHAIN_ID.RULE.JS)
+ if (jsRule.oneOfs.has(CHAIN_ID.ONE_OF.JS_MAIN)) {
+ const jsMainRule = jsRule.oneOf(CHAIN_ID.ONE_OF.JS_MAIN)
+ if (jsMainRule.uses.has('solid')) {
+ jsMainRule.use('solid').tap((loaderOptions: any) => ({
+ ...loaderOptions,
+ solid: {
+ ...loaderOptions?.solid,
+ hydratable: true,
+ generate: target === 'node' ? 'ssr' : 'dom',
+ },
+ }))
+ }
+ }
+ }
})
},
}
Or Apply changes locally with:
npx nx-cloud apply-locally 38qR-hrLX
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
The rc.1 adapter is rewritten onto Solid 2.0's native async model (TanStack/query#11308) and peer-requires solid-js >=2.0.0-rc.4, so it rides this branch's rc.4 bump. Catalog entry plus the non-catalogued solid-query-devtools pins move in lockstep. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bumps the Solid 2 toolchain to today's releases and adapts to the rc.3/rc.4 changes:
solid-js / @solidjs/web →
2.0.0-rc.4, @solidjs/vite-plugin →^3.0.0-next.35across the monorepo.Compiler package rename:
babel-preset-solidended at rc.2 (the compilers were lifted into the Solid monorepo as@solidjs/babel-plugin/@solidjs/compilerin rc.3). The webpack quickstart example and the with-webpack docs now use@solidjs/babel-plugin(its defaults are Solid-branded, so it is a drop-in).@rsbuild/plugin-solidis bumped to^2.0.0-beta.2so the rsbuild/rspack path compiles with the rc-line preset instead of the stale beta.34.Server function transport (rc.4): the
X-Server-Functionheader was removed — function ids now resolve from the request url pathname. The solid-start handler configures the endpoint mount, resolves ids viaparseServerFunctionUrl, and rewrites non-canonical requests onto the canonical url shape; the client reference derivesendpoint + idfrom the configured endpoint instead of a fixed base url (with a base, POSTs fetched the bare base and 404/500'd).AbortSignal support: rc.4 added a per-call invocation channel (
invoke(fn, { signal }, ...args)), i.e. the transport seam tracked in RFC 10 follow-up: support per-call server function cancellation solidjs/solid#3057. The client rpc now forwards asignalpassed to a server function call through that channel, and the previously skipped abort e2e tests are re-enabled (GET + POST).@tanstack/solid-query →
^6.0.0-rc.1(catalog + the lockstepsolid-query-devtoolspins): the rc.1 adapter is rewritten onto Solid 2.0's native async model (feat(solid-query): rewrite the adapter onto Solid 2.0's native async model query#11308) and peer-requiressolid-js >=2.0.0-rc.4, so it belongs with this bump. Verified: solid-router-ssr-query build clean, and all five query e2e suites pass (basic-solid-query router 3 + file-based 3, start basic-solid-query 6, query-integration 5, solid-query-layout-suspense 1).Verification (all at prior baselines or better):
test:unit(client / server)test:unit🤖 Generated with Claude Code