rsnext/test/e2e/app-dir/error-boundary-and-not-found-linking
Jiachi Liu d8f4fa8946
Fix not found hangs the build with overridden node env (#53106)
### Why

In #52985 the not found solution introduces `NODE_ENV` to determine if it his the not found boundary and should render the not found, as in the next build mode, we have `/_not-found` as a special route which has a empty parallel route, but in next dev mode so far it his the `parallel-default-route`. This could dependend on the `NODE_ENV` passing to next server but not necessarily.

### What

Fixes #53082
Fixes #53083 

### How

When server actions `not-found` hits, now we create a new loader tree based on the previous one, including `layout` and other components but not the children parallel routes

For production case, to make the rendering independent from the `NODE_ENV`, we're using original pathname to check if it's `/_not-found` to determine if it's production build 404 page

To support replace the loader tree of action, did a little refactor that passing down the loader tree from top level to `bodyResult`. Then we can change the loader tree itself before rendering, in short, we tweak it from original tree to one for not-found case, so server actions could render it properly
2023-07-24 21:00:53 +00:00
..
app Failing tests for 404 back/forward (#50047) 2023-05-22 17:04:36 +02:00
error-boundary-and-not-found-linking.test.ts Fix not found hangs the build with overridden node env (#53106) 2023-07-24 21:00:53 +00:00
error-navigation-override-node-env.test.ts Fix not found hangs the build with overridden node env (#53106) 2023-07-24 21:00:53 +00:00
next.config.js Reset not-found and error boundary when navigating (#49855) 2023-05-18 22:06:57 +02:00