Files
next.js/test/e2e/app-dir/worker/app/deployment-id-worker.ts
Tobias KoppersandGitHub 689f6fe38e Add NEXT_DEPLOYMENT_ID global (#86738)
- 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 https://github.com/vercel/next.js/pull/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.
2026-01-20 15:28:59 +01:00

3 lines
83 B
TypeScript

const deploymentId = process.env.NEXT_DEPLOYMENT_ID
self.postMessage(deploymentId)