[turbopack] Create a chunk_group_bootstrap_params() function#94631
Merged
sampoder merged 1 commit intoJul 16, 2026
Merged
Conversation
Contributor
Stats from current PR🔴 1 regression, 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: 3b88edc |
Contributor
Tests PassedCommit: 3b88edc |
registration_code() function
registration_code() functionregistration_code() method
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
2 times, most recently
from
June 10, 2026 18:48
58512bf to
0ce9422
Compare
registration_code() methodchunk_group_bootstrap_code() function
sampoder
marked this pull request as ready for review
June 10, 2026 18:53
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
from
June 10, 2026 21:40
0ce9422 to
da06b98
Compare
chunk_group_bootstrap_code() functionchunk_group_bootstrap_params() function
bgw
approved these changes
Jun 11, 2026
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
from
June 16, 2026 18:28
da06b98 to
e91fc51
Compare
sampoder
force-pushed
the
sp-turbopack-shared-runtime-asset
branch
from
June 16, 2026 18:28
8f48625 to
10dd355
Compare
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
2 times, most recently
from
June 16, 2026 18:36
f205679 to
9741df0
Compare
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
from
June 30, 2026 21:46
9741df0 to
dd58569
Compare
sampoder
force-pushed
the
sp-turbopack-shared-runtime-asset
branch
from
June 30, 2026 21:46
b234326 to
53e13a0
Compare
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
from
June 30, 2026 21:59
dd58569 to
1443d0e
Compare
bgw
reviewed
Jul 1, 2026
| source_maps, | ||
| *this.chunking_context.debug_ids_enabled().await?, | ||
| ); | ||
| Ok(Vc::cell(format!("{}", StringifyJs(¶ms)).into())) |
Member
There was a problem hiding this comment.
The build manifest is a JSON file. It seems like we're storing a JSON-stringified value inside of a JSON file.
- Don't use StringifyJs here, it's overkill, directly call
serde_json::to_stringinstead - Enable the
serde_jsonraw_valuefeature for this crate andnext-core. - use
serde_json::RawValue::from_stringto convert the string to aRawValue. - Make sure
SerializedBuildManifestincrates/next-core/src/next_manifests/mod.rs(later in this stack) uses theRawValue
RawValue skips the re-encoding.
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
2 times, most recently
from
July 15, 2026 22:25
e1f4eff to
53e61ed
Compare
sampoder
force-pushed
the
sp-turbopack-shared-runtime-asset
branch
from
July 15, 2026 22:25
282b095 to
240fa34
Compare
sampoder
force-pushed
the
sp-turbopack-shared-runtime-asset
branch
from
July 16, 2026 01:03
240fa34 to
b7872ef
Compare
sampoder
force-pushed
the
sp/turbopack/registration_code_method
branch
from
July 16, 2026 01:03
53e61ed to
3b88edc
Compare
sampoder
added a commit
that referenced
this pull request
Jul 16, 2026
) In #94631, we started pushing items to `globalThis["TURBOPACK"]` that were of a slightly different shape. See the comment on #94631 (comment). This PR adds a new method `registerEntry()` that is able to take that new shape (the object without the file name as an argument) and still instantiate the module + load the other chunks.
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.
This method generates the params for this code (random example for reference):
This is a pretty small change on its own (no functionality change), it makes it a separate method so that it can be called in future PRs. I will flag that the shape for inline-d bootstrap code will be slightly different (further up the stack). Because it isn't a chunk itself it does not have the first item in the array (
output/1ece_tests_snapshot_basic-tree-shake_export-namespace_input_index_0tbr8qy.js):This item only has
otherChunksandruntimeModuleIds. New code is added in #94664 to handle this different shape.