rsnext/test/e2e/app-dir/not-found
Shu Ding 783d7d589c
Extend not-found.js to catch all unmatched routes (#47328)
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))
2023-03-22 22:16:50 +00:00
..
app Extend not-found.js to catch all unmatched routes (#47328) 2023-03-22 22:16:50 +00:00
next.config.js Extend not-found.js to catch all unmatched routes (#47328) 2023-03-22 22:16:50 +00:00
not-found.test.ts Extend not-found.js to catch all unmatched routes (#47328) 2023-03-22 22:16:50 +00:00