You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turbopack: leave chunks in rscModuleMapping empty (#79511)
Previously, `clientReferenceManifest.rscModuleMapping.*.chunks` would list the RSC entry, such as `server/app/encryption/page.js` which contains
```js
const CHUNK_PUBLIC_PATH = "server/app/encryption/page.js";
const runtime = require("../../chunks/ssr/[turbopack]_runtime.js");
runtime.loadChunk("server/chunks/ssr/[root-of-the-server]__a810eacb._.js");
runtime.loadChunk("server/chunks/ssr/_7a4bd82c._.js");
runtime.loadChunk("server/chunks/ssr/test_e2e_app-dir_actions_app_not-found_b8caa540.js");
runtime.loadChunk("server/chunks/ssr/packages_next_dist_client_components_1d957a03._.js");
runtime.loadChunk("server/chunks/ssr/packages_next_dist_client_components_unauthorized-error_4ad694c5.js");
runtime.loadChunk("server/chunks/ssr/_0aa93936._.js");
runtime.getOrInstantiateRuntimeModule("[project]/test/e2e/app-dir/actions/.next-internal/server/app/encryption/page/actions.js { ACTIONS_MODULE0 => \"[project]/test/e2e/app-dir/actions/app/encryption/page.js [app-rsc] (ecmascript)\" } [app-rsc] (server actions loader, ecmascript)", CHUNK_PUBLIC_PATH);
runtime.getOrInstantiateRuntimeModule("[project]/packages/next/dist/esm/build/templates/app-page.js??page=/encryption/page { MODULE_0 => \"[project]/test/e2e/app-dir/actions/app/layout.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_1 => \"[project]/test/e2e/app-dir/actions/app/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/packages/next/dist/client/components/forbidden-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/packages/next/dist/client/components/unauthorized-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/test/e2e/app-dir/actions/app/encryption/page.js [app-rsc] (ecmascript, Next.js Server Component)\" } [app-rsc] (ecmascript)", CHUNK_PUBLIC_PATH);
module.exports = runtime.getOrInstantiateRuntimeModule("[project]/packages/next/dist/esm/build/templates/app-page.js??page=/encryption/page { MODULE_0 => \"[project]/test/e2e/app-dir/actions/app/layout.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_1 => \"[project]/test/e2e/app-dir/actions/app/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/packages/next/dist/client/components/forbidden-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/packages/next/dist/client/components/unauthorized-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/test/e2e/app-dir/actions/app/encryption/page.js [app-rsc] (ecmascript, Next.js Server Component)\" } [app-rsc] (ecmascript)", CHUNK_PUBLIC_PATH).exports;
```
The problem is that this chunk (Turbopack calls them "entry chunk") exports some entry point, as opposed to the usual chunk which does `module.exports = {19285: function(){}, ...}` to export the module factories (called an "evaluated chunk")
If you use `__turbopack_load__` to load an entry chunk, stuff breaks because you end up with the entry module's exports in the module factory map.
Hendrik confirmed that Webpack also doesn't specify any chunks in here, they are already loaded anyway. Then this case of `__turbopack_load__`ing an entry chunk never occurs.
0 commit comments