File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1+ - fix non static check for not-found route in Next.js 14.2 (#7012 )
Original file line number Diff line number Diff line change @@ -253,11 +253,11 @@ export async function build(
253253 dynamicRoutes ,
254254 ) ;
255255
256- if (
257- unrenderedServerComponents . has ( "/_not-found" ) &&
258- ( await hasStaticAppNotFoundComponent ( dir , distDir ) )
259- ) {
260- unrenderedServerComponents . delete ( "/_not-found" ) ;
256+ const notFoundPageKey = [ "/_not-found" , "/_not-found/page" ] . find ( ( key ) =>
257+ unrenderedServerComponents . has ( key ) ,
258+ ) ;
259+ if ( notFoundPageKey && ( await hasStaticAppNotFoundComponent ( dir , distDir ) ) ) {
260+ unrenderedServerComponents . delete ( notFoundPageKey ) ;
261261 }
262262
263263 for ( const key of unrenderedServerComponents ) {
You can’t perform that action at this time.
0 commit comments