783d7d589c
This PR continues the work of #45867, that treats the root-level `not-found.js` file inside app dir as the global 404 page, if it exists. Previously, it fallbacks to the /404 route inside pages (and the default one if `404.js` isn't specified). In the implementation, we include `/not-found` in `appPaths` during the build, and treat it as the special `/404` path during pre-rendering. In the renderer, if the `/404` pathname is being handled, we always render the not found boundary. And finally inside the server, we check if `/not-found` exists before picking up the `/404` component. A deployed example: https://not-found-shuding1.vercel.app/balasdkjfaklsdf fix NEXT-463 ([link](https://linear.app/vercel/issue/NEXT-463)) |
||
---|---|---|
.. | ||
app | ||
next.config.js | ||
not-found.test.ts |