We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
index.html
1 parent 4c46685 commit 37a55e3Copy full SHA for 37a55e3
.changeset/serious-ravens-appear.md
@@ -0,0 +1,5 @@
1
+---
2
+"@react-router/dev": patch
3
4
+
5
+if we are in SAP mode, always render the `index.html` for hydration
packages/react-router-dev/vite/plugin.ts
@@ -1224,7 +1224,10 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = (_config) => {
1224
serverBuildDirectory,
1225
clientBuildDirectory
1226
);
1227
- } else if (!ctx.reactRouterConfig.ssr) {
+ }
1228
1229
+ // If we are in SPA mode, *always* generate the `index.html` that can be served at any location for hydration.
1230
+ if (!ctx.reactRouterConfig.ssr) {
1231
await handleSpaMode(
1232
viteConfig,
1233
ctx.reactRouterConfig,
0 commit comments