next.js
808d2ba3 - error when output: export is used with intercepting routes (#75058)

Commit
342 days ago
error when output: export is used with intercepting routes (#75058) Intercepting routes are built on top of [rewrites](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites) which is one of the listed [unsupported features](https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features) of `output: "export"`. However, because the Next.js server injects the interception routes, it's not caught by existing validation logic in the export flow. This properly documents that intercepting routes are not currently supported by `output: "export"` and hard errors in next dev/build if detected. Previously route interception would just not have worked, instead serving the non-intercepted page when built, leading to a confusing experience. We eventually want to support this with improved SPA/export features, however that's out of scope for this PR: the goal here is to ensure we're providing more immediate feedback about the fact that this is unsupported.
Author
Parents
Loading