Skip to content

Commit a0a2d7a

Browse files
committed
Skip resource route flow in dev mode when SPA mode is enabled
1 parent 77b730c commit a0a2d7a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/cool-pillows-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
Skip resource route flow in dev server in SPA mode

packages/react-router/lib/server-runtime/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export const createRequestHandler: CreateRequestHandlerFunction = (
250250
}
251251
}
252252
} else if (
253+
!request.headers.has("X-React-Router-SPA-Mode") &&
253254
matches &&
254255
matches[matches.length - 1].route.module.default == null &&
255256
matches[matches.length - 1].route.module.ErrorBoundary == null

0 commit comments

Comments
 (0)