Repository navigation
Conversation
…chunk iteration order
…client build capture
🚀 Changeset Version Preview4 package(s) bumped directly, 10 bumped as dependents. 🟩 Patch bumps
|
Bundle Size Benchmarks
The following scenarios have bundle-size changes or lack baseline data for comparison:
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. |
Remove the real Rspack compile fixture, its helper and snapshots. Cover the same behavior in the existing normalized-client-build unit tests with a small fake chunk graph: output order of imports and dynamic imports, module reads only for route-split and hydration chunks, and one read per chunk graph property.
…eader Clarify comments on the chunk scan and read helpers, read child groups directly since their merged JS files are already cached per group, keep the unrelated isManifestJsAsset line unchanged, and assert the set of chunks whose modules are read.
Owner
Author
|
Raised upstream as TanStack#8588. |
guru-irl
pushed a commit
that referenced
this pull request
Nov 11, 2026
… over HTTP, deprecate the rest outside the unreserved set (TanStack#8858) * refactor(start-plugin-core): derive server-fn ids from the stable key, with 22-character defaults `serverFns.generateFunctionId` now receives the server function's stable name (`greetUser`) as `functionName` instead of the generated handler name (`greetUser_createServerFn_handler`). Repeats of the same variable name in one file get `#1`, `#2`, ... Default production ids are the first 22 base64url characters of the SHA256 of `<file>#<stable key>` instead of the full 64-character hex digest. Split out of TanStack#8817, which derives ids the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(start-plugin-core): keep generateFunctionId's handler-name input, reject custom ids that aren't one URL path segment Follows TanStack#8817's current id contract: - `generateFunctionId` receives the generated handler name again (`greetUser_createServerFn_handler`, `_1`, `_2`… for repeats), with characters outside `[A-Za-z0-9_$]` as `_`. The handler export keeps its name. - The default id stays 22 base64url characters of `sha256("<root-relative file>#<variable name>")`, `#n` for repeats. - A custom id outside RFC 3986's unreserved characters and `$` (or `.`, `..`, empty) fails the build, naming the file, the function and the id. - The e2e id maps return to main's keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(start-plugin-core): a repeated server function name loses leading and doubled underscores The generator's `functionName` for a repeated name goes through the old increment rule, which strips leading underscores and collapses runs of underscores (a second `_x` gets `x_createServerFn_handler_1`). Say so, and pin it with `_x` twice and `café` then `caf_`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(start-plugin-core): names that become equal after the `_` replacement get suffixes too `café` and `caf_` both give `caf__createServerFn_handler`, so the later one gets `caf_createServerFn_handler_1`, like a repeated variable name. Describe the replacement first, then the suffix rule for any resulting duplicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(start-plugin-core): keep main's server-fn ids; refuse custom ids that never worked over HTTP TanStack#8817 now prints main's default ids and passes main's functionName to generateFunctionId, so this reverts the shorter default ids, the generator-name split and the empty-id failure. What stays is TanStack#8817's custom-id check: an id the URL never carries whole fails the build, one with other characters outside the unreserved set and $ builds with a deprecation warning, and the resolver manifest escapes a `'` in an id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
🎯 Changes
normalizeRspackClientBuildconverts the Rspack client compilation into the data used to build the Start manifest. It runs on every Rsbuild build and on every dev rebuild. This PR makes it faster for builds with many chunks. The output does not change.files,auxiliaryFiles,groupsIterable,chunks,childrenIterable) are now read once per call. Rspack builds a new collection on every read, and the previous code read them many times per chunk.getChunkModulesfor every chunk.Benchmarks
Median of 21 runs of
normalizeRspackClientBuildon generated apps, Rspack 2.2.3, production unless noted:mainFor each app, the output was compared with
mainon Rspack 2.0.0, 2.1.1 and 2.2.3 and was identical.Tests
normalized-client-build.test.tsuse a small fake chunk graph. They check that:main);@tanstack/start-plugin-coretest:unit,test:typesandtest:eslintpass.rsbuild,rsc-rsbuildandhmrdeferred-hydration(production and dev)deferred-hydrationcss-inline, with and without transform assets✅ Checklist
🚀 Release Impact