@react-router/dev 0.0.0-experimental-795b50c5b → 0.0.0-experimental-ae6d61df4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +198 -85
- package/dist/config/default-rsc-entries/entry.rsc.tsx +6 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +1 -1
- package/dist/internal.js +365 -107
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +21 -6
- package/dist/vite.js +309 -240
- package/package.json +11 -7
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
|
10
10
|
|
|
11
11
|
import routes from "virtual:react-router/unstable_rsc/routes";
|
|
12
|
+
import basename from "virtual:react-router/unstable_rsc/basename";
|
|
12
13
|
|
|
13
14
|
export async function fetchServer(request: Request) {
|
|
14
15
|
return await matchRSCServerRequest({
|
|
@@ -19,6 +20,7 @@ export async function fetchServer(request: Request) {
|
|
|
19
20
|
loadServerAction,
|
|
20
21
|
request,
|
|
21
22
|
routes,
|
|
23
|
+
basename,
|
|
22
24
|
generateResponse(match, options) {
|
|
23
25
|
return new Response(renderToReadableStream(match.payload, options), {
|
|
24
26
|
status: match.statusCode,
|
|
@@ -34,3 +36,7 @@ export default async function handler(request: Request) {
|
|
|
34
36
|
>("ssr", "index");
|
|
35
37
|
return ssr.default(request, fetchServer);
|
|
36
38
|
}
|
|
39
|
+
|
|
40
|
+
if (import.meta.hot) {
|
|
41
|
+
import.meta.hot.accept();
|
|
42
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -202,6 +202,10 @@ type ResolvedReactRouterConfig = Readonly<{
|
|
|
202
202
|
* SPA without server-rendering. Default's to `true`.
|
|
203
203
|
*/
|
|
204
204
|
ssr: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* The absolute path to the root route file.
|
|
207
|
+
*/
|
|
208
|
+
unstable_rootRouteFile: string;
|
|
205
209
|
/**
|
|
206
210
|
* The resolved array of route config entries exported from `routes.ts`
|
|
207
211
|
*/
|
package/dist/config.js
CHANGED