Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 20, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

xusd320 and others added 7 commits January 20, 2026 14:36
When `NEXT_DEPLOYMENT_ID` is set (and thus skew protection is enabled), then these pages router manifests are actually on a different path (so that the output paths doesn't change with the build id anymore)

Fixup for #88641
…88753)

The function only used `url.pathname`, not `url.search`.
- Adds a `process.env.NEXT_DEPLOYMENT_ID` -> `globalThis.NEXT_DEPLOYMENT_ID` replacement
- On startup, `globalThis.NEXT_DEPLOYMENT_ID` is initialized to `process.env.NEXT_DEPLOYMENT_ID_COMPILE_TIME`

This prepares for #88761 to replace `process.env.NEXT_DEPLOYMENT_ID_COMPILE_TIME` with reading `<html data-dpl-id>` so that we can remove the env var inlining

However, all of this is only done for Turbopack, because we cannot forward `globalThis.NEXT_DEPLOYMENT_ID` to web workers with Webpack easily.
… chunks (#88741)

Closes PACK-6539

When `experimental.runtimeServerDeploymentId` is enabled, read the `process.env.NEXT_DEPLOYMENT_ID` and append to the chunks when evaluating the `client-reference-manifest.js`

Originally, I tried to do it after the manifest is loaded (in `loadComponents` or in the `RouteModule.prepare`) to "hydrate" the manifest, but that is too late because the manifest needs to be initialized immediately to make module-evaluation-time server actions work (which need the manifest immediately)
We don't inline `process.env.NEXT_DEPLOYMENT_ID` anymore into browser chunks, and instead read it from `<html data-dpl-id` attribute at runtime.

Closes PACK-6538

- [x] ~~Causes a hydration error at the moment.~~ Solved by removing the attribute immediately before hydration happens
<img width="1443" height="620" alt="Bildschirmfoto 2026-01-20 um 12 32 06" src="https://github.com/user-attachments/assets/b69b3a0b-129d-44f4-84d1-10572b650437" />
@pull pull bot locked and limited conversation to collaborators Jan 20, 2026
@pull pull bot added the ⤵️ pull label Jan 20, 2026
@pull pull bot merged commit 13b13ed into code:canary Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants