next.js
6faa5536 - [turbopack] Create a `chunk_group_bootstrap_params()` function (#94631)

Commit
51 days ago
[turbopack] Create a `chunk_group_bootstrap_params()` function (#94631) This method generates the params for this code (random example for reference): ```javascript (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ "output/1ece_tests_snapshot_basic-tree-shake_export-namespace_input_index_0tbr8qy.js", {"otherChunks":["output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_export-namespace_input_1mqgz2-._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/index.js [test] (ecmascript)"]} ]); ``` 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`): ```javascript (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/node_modules_react-dom_82bf80._.js","static/chunks/_4f9bce._.js","static/chunks/pages_index_tsx_5a9e._.js"],"runtimeModuleIds":[96168]}); ``` This item only has `otherChunks` and `runtimeModuleIds`. New code is added in https://github.com/vercel/next.js/pull/94664 to handle this different shape.
Author
Parents
Loading