next.js
5b106049 - Revert stabilization of `forbidden()` and `unauthorized()` (#99734)

Commit
2 days ago
Revert stabilization of `forbidden()` and `unauthorized()` (#99734) Stabilizing `forbidden()` and `unauthorized()` means the built-in 403 and 401 fallbacks are rendered into every page's payload, even for apps that don't define `forbidden.tsx` or `unauthorized.tsx`. On a fresh create-next-app that's about 2.3KB of uncompressed HTML per page (~125 bytes gzipped). I knew about the regression but I forgot that it applied to every app and every page, rather than just those that use `forbidden.tsx` or `unauthorized.tsx`. To avoid blocking the 16.4 release, we'll keep this feature in experimental for now until we fix the implementation to render the fallbacks lazily. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Parents
Loading