Files
Niklas MischkulnigandGitHub 49e0a8a8c0 Handle Pages data route skew with deployment id header, take 2 (#89325)
Reapply https://github.com/vercel/next.js/pull/88959
Revert https://github.com/vercel/next.js/pull/89323


Closes PACK-6537
Closes PACK-6756

- Deployment skew (forcing a MPA nav instead of a SPA nav if a deployment happened inbetween) is handled by comparing a header on the client side.
    - The other case that used build ids was app router, which was changed to the same approach in https://github.com/vercel/next.js/pull/88855
- Then, when a deployment id is available, make the build id a constant
	- Particularly, this makes the rollout of this much easier as the data route paths stay the same (both in Next.js itself as well as in the builder)


If you use `output:export` and set `config.deploymentId` (i.e. enable skew protection) you are still expected to set these headers.
2026-02-04 18:07:39 +01:00

9 lines
165 B
JavaScript

/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
distDir: process.env.DIST_DIR && '.next.' + process.env.DIST_DIR,
}
module.exports = nextConfig