@react-router/dev 0.0.0-experimental-3d7dcee → 0.0.0-experimental-426e5caec
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/CHANGELOG.md +20 -0
- package/dist/cli/index.js +20 -12
- package/dist/config/defaults/entry.server.node.tsx +18 -8
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/internal.js +154 -35
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.d.ts +2 -2
- package/dist/vite/cloudflare.js +2 -2
- package/dist/vite.js +50 -49
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## 7.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: memory leak in default entry.server ([#14200](https://github.com/remix-run/react-router/pull/14200))
|
|
8
|
+
- Updated dependencies:
|
|
9
|
+
- `react-router@7.8.2`
|
|
10
|
+
- `@react-router/node@7.8.2`
|
|
11
|
+
- `@react-router/serve@7.8.2`
|
|
12
|
+
|
|
13
|
+
## 7.8.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Update generated `Route.MetaArgs` type so `loaderData` is only potentially undefined when an `ErrorBoundary` export is present ([#14173](https://github.com/remix-run/react-router/pull/14173))
|
|
18
|
+
- Updated dependencies:
|
|
19
|
+
- `react-router@7.8.1`
|
|
20
|
+
- `@react-router/node@7.8.1`
|
|
21
|
+
- `@react-router/serve@7.8.1`
|
|
22
|
+
|
|
3
23
|
## 7.8.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @react-router/dev v0.0.0-experimental-
|
|
3
|
+
* @react-router/dev v0.0.0-experimental-426e5caec
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -477,7 +477,7 @@ async function resolveConfig({
|
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
let future = {
|
|
480
|
-
|
|
480
|
+
v8_middleware: reactRouterUserConfig.future?.v8_middleware ?? false,
|
|
481
481
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
482
482
|
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false,
|
|
483
483
|
unstable_subResourceIntegrity: reactRouterUserConfig.future?.unstable_subResourceIntegrity ?? false,
|
|
@@ -897,7 +897,7 @@ function generateFuture(ctx) {
|
|
|
897
897
|
|
|
898
898
|
declare module "react-router" {
|
|
899
899
|
interface Future {
|
|
900
|
-
|
|
900
|
+
middleware: ${ctx.config.future.v8_middleware}
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
`;
|
|
@@ -1118,11 +1118,11 @@ function getRouteAnnotations({
|
|
|
1118
1118
|
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
1119
1119
|
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
1120
1120
|
|
|
1121
|
-
//
|
|
1122
|
-
export type
|
|
1121
|
+
// middleware
|
|
1122
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
1123
1123
|
|
|
1124
|
-
//
|
|
1125
|
-
export type
|
|
1124
|
+
// clientMiddleware
|
|
1125
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
1126
1126
|
|
|
1127
1127
|
// loader
|
|
1128
1128
|
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
@@ -1393,7 +1393,7 @@ var init_route_chunks = __esm({
|
|
|
1393
1393
|
routeChunkExportNames = [
|
|
1394
1394
|
"clientAction",
|
|
1395
1395
|
"clientLoader",
|
|
1396
|
-
"
|
|
1396
|
+
"clientMiddleware",
|
|
1397
1397
|
"HydrateFallback"
|
|
1398
1398
|
];
|
|
1399
1399
|
mainChunkName = "main";
|
|
@@ -1403,7 +1403,7 @@ var init_route_chunks = __esm({
|
|
|
1403
1403
|
main: `${routeChunkQueryStringPrefix}main`,
|
|
1404
1404
|
clientAction: `${routeChunkQueryStringPrefix}clientAction`,
|
|
1405
1405
|
clientLoader: `${routeChunkQueryStringPrefix}clientLoader`,
|
|
1406
|
-
|
|
1406
|
+
clientMiddleware: `${routeChunkQueryStringPrefix}clientMiddleware`,
|
|
1407
1407
|
HydrateFallback: `${routeChunkQueryStringPrefix}HydrateFallback`
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
@@ -1417,6 +1417,13 @@ var init_with_props = __esm({
|
|
|
1417
1417
|
}
|
|
1418
1418
|
});
|
|
1419
1419
|
|
|
1420
|
+
// vite/plugins/validate-plugin-order.ts
|
|
1421
|
+
var init_validate_plugin_order = __esm({
|
|
1422
|
+
"vite/plugins/validate-plugin-order.ts"() {
|
|
1423
|
+
"use strict";
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1420
1427
|
// vite/plugin.ts
|
|
1421
1428
|
async function resolveViteConfig({
|
|
1422
1429
|
configFile,
|
|
@@ -1685,10 +1692,11 @@ var init_plugin = __esm({
|
|
|
1685
1692
|
init_vite();
|
|
1686
1693
|
init_config();
|
|
1687
1694
|
init_with_props();
|
|
1695
|
+
init_validate_plugin_order();
|
|
1688
1696
|
CLIENT_NON_COMPONENT_EXPORTS = [
|
|
1689
1697
|
"clientAction",
|
|
1690
1698
|
"clientLoader",
|
|
1691
|
-
"
|
|
1699
|
+
"clientMiddleware",
|
|
1692
1700
|
"handle",
|
|
1693
1701
|
"meta",
|
|
1694
1702
|
"links",
|
|
@@ -1824,7 +1832,7 @@ async function viteAppBuild(root, {
|
|
|
1824
1832
|
},
|
|
1825
1833
|
configResolved(config) {
|
|
1826
1834
|
let hasReactRouterPlugin = config.plugins.find(
|
|
1827
|
-
(plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc
|
|
1835
|
+
(plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc"
|
|
1828
1836
|
);
|
|
1829
1837
|
if (!hasReactRouterPlugin) {
|
|
1830
1838
|
throw new Error(
|
|
@@ -1964,7 +1972,7 @@ async function dev(root, {
|
|
|
1964
1972
|
logLevel
|
|
1965
1973
|
});
|
|
1966
1974
|
if (!server.config.plugins.find(
|
|
1967
|
-
(plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc
|
|
1975
|
+
(plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc"
|
|
1968
1976
|
)) {
|
|
1969
1977
|
console.error(
|
|
1970
1978
|
import_picocolors6.default.red("React Router Vite plugin not found in Vite config")
|
|
@@ -16,7 +16,7 @@ export default function handleRequest(
|
|
|
16
16
|
routerContext: EntryContext,
|
|
17
17
|
loadContext: AppLoadContext,
|
|
18
18
|
// If you have middleware enabled:
|
|
19
|
-
// loadContext:
|
|
19
|
+
// loadContext: RouterContextProvider
|
|
20
20
|
) {
|
|
21
21
|
return new Promise((resolve, reject) => {
|
|
22
22
|
let shellRendered = false;
|
|
@@ -29,24 +29,38 @@ export default function handleRequest(
|
|
|
29
29
|
? "onAllReady"
|
|
30
30
|
: "onShellReady";
|
|
31
31
|
|
|
32
|
+
// Abort the rendering stream after the `streamTimeout` so it has time to
|
|
33
|
+
// flush down the rejected boundaries
|
|
34
|
+
let timeoutId: ReturnType<typeof setTimeout> | undefined = setTimeout(
|
|
35
|
+
() => abort(),
|
|
36
|
+
streamTimeout + 1000,
|
|
37
|
+
);
|
|
38
|
+
|
|
32
39
|
const { pipe, abort } = renderToPipeableStream(
|
|
33
40
|
<ServerRouter context={routerContext} url={request.url} />,
|
|
34
41
|
{
|
|
35
42
|
[readyOption]() {
|
|
36
43
|
shellRendered = true;
|
|
37
|
-
const body = new PassThrough(
|
|
44
|
+
const body = new PassThrough({
|
|
45
|
+
final(callback) {
|
|
46
|
+
// Clear the timeout to prevent retaining the closure and memory leak
|
|
47
|
+
clearTimeout(timeoutId);
|
|
48
|
+
timeoutId = undefined;
|
|
49
|
+
callback();
|
|
50
|
+
},
|
|
51
|
+
});
|
|
38
52
|
const stream = createReadableStreamFromReadable(body);
|
|
39
53
|
|
|
40
54
|
responseHeaders.set("Content-Type", "text/html");
|
|
41
55
|
|
|
56
|
+
pipe(body);
|
|
57
|
+
|
|
42
58
|
resolve(
|
|
43
59
|
new Response(stream, {
|
|
44
60
|
headers: responseHeaders,
|
|
45
61
|
status: responseStatusCode,
|
|
46
62
|
}),
|
|
47
63
|
);
|
|
48
|
-
|
|
49
|
-
pipe(body);
|
|
50
64
|
},
|
|
51
65
|
onShellError(error: unknown) {
|
|
52
66
|
reject(error);
|
|
@@ -62,9 +76,5 @@ export default function handleRequest(
|
|
|
62
76
|
},
|
|
63
77
|
},
|
|
64
78
|
);
|
|
65
|
-
|
|
66
|
-
// Abort the rendering stream after the `streamTimeout` so it has time to
|
|
67
|
-
// flush down the rejected boundaries
|
|
68
|
-
setTimeout(abort, streamTimeout + 1000);
|
|
69
79
|
});
|
|
70
80
|
}
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
package/dist/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-426e5caec
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -510,7 +510,7 @@ async function resolveConfig({
|
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
let future = {
|
|
513
|
-
|
|
513
|
+
v8_middleware: reactRouterUserConfig.future?.v8_middleware ?? false,
|
|
514
514
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
515
515
|
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false,
|
|
516
516
|
unstable_subResourceIntegrity: reactRouterUserConfig.future?.unstable_subResourceIntegrity ?? false,
|
|
@@ -801,7 +801,7 @@ function generateFuture(ctx) {
|
|
|
801
801
|
|
|
802
802
|
declare module "react-router" {
|
|
803
803
|
interface Future {
|
|
804
|
-
|
|
804
|
+
middleware: ${ctx.config.future.v8_middleware}
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
807
|
`;
|
|
@@ -1023,11 +1023,11 @@ function getRouteAnnotations({
|
|
|
1023
1023
|
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
1024
1024
|
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
1025
1025
|
|
|
1026
|
-
//
|
|
1027
|
-
export type
|
|
1026
|
+
// middleware
|
|
1027
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
1028
1028
|
|
|
1029
|
-
//
|
|
1030
|
-
export type
|
|
1029
|
+
// clientMiddleware
|
|
1030
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
1031
1031
|
|
|
1032
1032
|
// loader
|
|
1033
1033
|
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
@@ -1348,23 +1348,43 @@ function invalidDestructureError(name) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
|
|
1350
1350
|
// vite/rsc/virtual-route-modules.ts
|
|
1351
|
+
var SERVER_ONLY_COMPONENT_EXPORTS = ["ServerComponent"];
|
|
1351
1352
|
var SERVER_ONLY_ROUTE_EXPORTS = [
|
|
1353
|
+
...SERVER_ONLY_COMPONENT_EXPORTS,
|
|
1352
1354
|
"loader",
|
|
1353
1355
|
"action",
|
|
1354
|
-
"
|
|
1355
|
-
"headers"
|
|
1356
|
-
"ServerComponent"
|
|
1356
|
+
"middleware",
|
|
1357
|
+
"headers"
|
|
1357
1358
|
];
|
|
1358
|
-
var
|
|
1359
|
-
|
|
1359
|
+
var SERVER_ONLY_ROUTE_EXPORTS_SET = new Set(SERVER_ONLY_ROUTE_EXPORTS);
|
|
1360
|
+
function isServerOnlyRouteExport(name) {
|
|
1361
|
+
return SERVER_ONLY_ROUTE_EXPORTS_SET.has(name);
|
|
1362
|
+
}
|
|
1363
|
+
var COMMON_COMPONENT_EXPORTS = [
|
|
1360
1364
|
"ErrorBoundary",
|
|
1361
1365
|
"HydrateFallback",
|
|
1362
1366
|
"Layout"
|
|
1363
1367
|
];
|
|
1368
|
+
var SERVER_FIRST_COMPONENT_EXPORTS = [
|
|
1369
|
+
...COMMON_COMPONENT_EXPORTS,
|
|
1370
|
+
...SERVER_ONLY_COMPONENT_EXPORTS
|
|
1371
|
+
];
|
|
1372
|
+
var SERVER_FIRST_COMPONENT_EXPORTS_SET = new Set(
|
|
1373
|
+
SERVER_FIRST_COMPONENT_EXPORTS
|
|
1374
|
+
);
|
|
1375
|
+
function isServerFirstComponentExport(name) {
|
|
1376
|
+
return SERVER_FIRST_COMPONENT_EXPORTS_SET.has(
|
|
1377
|
+
name
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
var CLIENT_COMPONENT_EXPORTS = [
|
|
1381
|
+
...COMMON_COMPONENT_EXPORTS,
|
|
1382
|
+
"default"
|
|
1383
|
+
];
|
|
1364
1384
|
var CLIENT_NON_COMPONENT_EXPORTS = [
|
|
1365
1385
|
"clientAction",
|
|
1366
1386
|
"clientLoader",
|
|
1367
|
-
"
|
|
1387
|
+
"clientMiddleware",
|
|
1368
1388
|
"handle",
|
|
1369
1389
|
"meta",
|
|
1370
1390
|
"links",
|
|
@@ -1376,25 +1396,43 @@ function isClientNonComponentExport(name) {
|
|
|
1376
1396
|
}
|
|
1377
1397
|
var CLIENT_ROUTE_EXPORTS = [
|
|
1378
1398
|
...CLIENT_NON_COMPONENT_EXPORTS,
|
|
1379
|
-
...
|
|
1399
|
+
...CLIENT_COMPONENT_EXPORTS
|
|
1380
1400
|
];
|
|
1381
1401
|
var CLIENT_ROUTE_EXPORTS_SET = new Set(CLIENT_ROUTE_EXPORTS);
|
|
1382
1402
|
function isClientRouteExport(name) {
|
|
1383
1403
|
return CLIENT_ROUTE_EXPORTS_SET.has(name);
|
|
1384
1404
|
}
|
|
1405
|
+
var ROUTE_EXPORTS = [
|
|
1406
|
+
...SERVER_ONLY_ROUTE_EXPORTS,
|
|
1407
|
+
...CLIENT_ROUTE_EXPORTS
|
|
1408
|
+
];
|
|
1409
|
+
var ROUTE_EXPORTS_SET = new Set(ROUTE_EXPORTS);
|
|
1410
|
+
function isRouteExport(name) {
|
|
1411
|
+
return ROUTE_EXPORTS_SET.has(name);
|
|
1412
|
+
}
|
|
1413
|
+
function isCustomRouteExport(name) {
|
|
1414
|
+
return !isRouteExport(name);
|
|
1415
|
+
}
|
|
1416
|
+
function hasReactServerCondition(viteEnvironment) {
|
|
1417
|
+
return viteEnvironment.config.resolve.conditions.includes("react-server");
|
|
1418
|
+
}
|
|
1385
1419
|
function transformVirtualRouteModules({
|
|
1386
1420
|
id,
|
|
1387
1421
|
code,
|
|
1388
|
-
viteCommand
|
|
1422
|
+
viteCommand,
|
|
1423
|
+
routeIdByFile,
|
|
1424
|
+
viteEnvironment
|
|
1389
1425
|
}) {
|
|
1390
|
-
if (
|
|
1391
|
-
return
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1426
|
+
if (isVirtualRouteModuleId(id) || routeIdByFile.has(id)) {
|
|
1427
|
+
return createVirtualRouteModuleCode({
|
|
1428
|
+
id,
|
|
1429
|
+
code,
|
|
1430
|
+
viteCommand,
|
|
1431
|
+
viteEnvironment
|
|
1432
|
+
});
|
|
1395
1433
|
}
|
|
1396
1434
|
if (isVirtualServerRouteModuleId(id)) {
|
|
1397
|
-
return createVirtualServerRouteModuleCode({ id, code });
|
|
1435
|
+
return createVirtualServerRouteModuleCode({ id, code, viteEnvironment });
|
|
1398
1436
|
}
|
|
1399
1437
|
if (isVirtualClientRouteModuleId(id)) {
|
|
1400
1438
|
return createVirtualClientRouteModuleCode({ id, code, viteCommand });
|
|
@@ -1403,22 +1441,44 @@ function transformVirtualRouteModules({
|
|
|
1403
1441
|
async function createVirtualRouteModuleCode({
|
|
1404
1442
|
id,
|
|
1405
1443
|
code: routeSource,
|
|
1406
|
-
viteCommand
|
|
1444
|
+
viteCommand,
|
|
1445
|
+
viteEnvironment
|
|
1407
1446
|
}) {
|
|
1447
|
+
const isReactServer = hasReactServerCondition(viteEnvironment);
|
|
1408
1448
|
const { staticExports, isServerFirstRoute, hasClientExports } = parseRouteExports(routeSource);
|
|
1409
1449
|
const clientModuleId = getVirtualClientModuleId(id);
|
|
1410
1450
|
const serverModuleId = getVirtualServerModuleId(id);
|
|
1411
1451
|
let code = "";
|
|
1412
1452
|
if (isServerFirstRoute) {
|
|
1453
|
+
if (staticExports.some(isServerFirstComponentExport)) {
|
|
1454
|
+
code += `import React from "react";
|
|
1455
|
+
`;
|
|
1456
|
+
}
|
|
1413
1457
|
for (const staticExport of staticExports) {
|
|
1414
1458
|
if (isClientNonComponentExport(staticExport)) {
|
|
1415
1459
|
code += `export { ${staticExport} } from "${clientModuleId}";
|
|
1416
1460
|
`;
|
|
1417
|
-
} else if (
|
|
1418
|
-
|
|
1461
|
+
} else if (isReactServer && isServerFirstComponentExport(staticExport) && // Layout wraps all other component exports so doesn't need CSS injected
|
|
1462
|
+
staticExport !== "Layout") {
|
|
1463
|
+
code += `import { ${staticExport} as ${staticExport}WithoutCss } from "${serverModuleId}";
|
|
1464
|
+
`;
|
|
1465
|
+
code += `export ${staticExport === "ServerComponent" ? "default " : " "}function ${staticExport}(props) {
|
|
1466
|
+
`;
|
|
1467
|
+
code += ` return React.createElement(React.Fragment, null,
|
|
1468
|
+
`;
|
|
1469
|
+
code += ` import.meta.viteRsc.loadCss(),
|
|
1470
|
+
`;
|
|
1471
|
+
code += ` React.createElement(${staticExport}WithoutCss, props),
|
|
1472
|
+
`;
|
|
1473
|
+
code += ` );
|
|
1474
|
+
`;
|
|
1475
|
+
code += `}
|
|
1419
1476
|
`;
|
|
1420
|
-
} else {
|
|
1477
|
+
} else if (isReactServer && isRouteExport(staticExport)) {
|
|
1421
1478
|
code += `export { ${staticExport} } from "${serverModuleId}";
|
|
1479
|
+
`;
|
|
1480
|
+
} else if (isCustomRouteExport(staticExport)) {
|
|
1481
|
+
code += `export { ${staticExport} } from "${isReactServer ? serverModuleId : clientModuleId}";
|
|
1422
1482
|
`;
|
|
1423
1483
|
}
|
|
1424
1484
|
}
|
|
@@ -1431,8 +1491,11 @@ async function createVirtualRouteModuleCode({
|
|
|
1431
1491
|
if (isClientRouteExport(staticExport)) {
|
|
1432
1492
|
code += `export { ${staticExport} } from "${clientModuleId}";
|
|
1433
1493
|
`;
|
|
1434
|
-
} else {
|
|
1494
|
+
} else if (isReactServer && isServerOnlyRouteExport(staticExport)) {
|
|
1435
1495
|
code += `export { ${staticExport} } from "${serverModuleId}";
|
|
1496
|
+
`;
|
|
1497
|
+
} else if (isCustomRouteExport(staticExport)) {
|
|
1498
|
+
code += `export { ${staticExport} } from "${isReactServer ? serverModuleId : clientModuleId}";
|
|
1436
1499
|
`;
|
|
1437
1500
|
}
|
|
1438
1501
|
}
|
|
@@ -1445,8 +1508,18 @@ async function createVirtualRouteModuleCode({
|
|
|
1445
1508
|
}
|
|
1446
1509
|
function createVirtualServerRouteModuleCode({
|
|
1447
1510
|
id,
|
|
1448
|
-
code: routeSource
|
|
1511
|
+
code: routeSource,
|
|
1512
|
+
viteEnvironment
|
|
1449
1513
|
}) {
|
|
1514
|
+
if (!hasReactServerCondition(viteEnvironment)) {
|
|
1515
|
+
throw new Error(
|
|
1516
|
+
[
|
|
1517
|
+
"Virtual server route module was loaded outside of the RSC environment.",
|
|
1518
|
+
`Environment Name: ${viteEnvironment.name}`,
|
|
1519
|
+
`Module ID: ${id}`
|
|
1520
|
+
].join("\n")
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1450
1523
|
const { staticExports, isServerFirstRoute } = parseRouteExports(routeSource);
|
|
1451
1524
|
const clientModuleId = getVirtualClientModuleId(id);
|
|
1452
1525
|
const serverRouteModuleAst = import_parser.parse(routeSource, {
|
|
@@ -1474,7 +1547,7 @@ function createVirtualClientRouteModuleCode({
|
|
|
1474
1547
|
viteCommand
|
|
1475
1548
|
}) {
|
|
1476
1549
|
const { staticExports, isServerFirstRoute, hasClientExports } = parseRouteExports(routeSource);
|
|
1477
|
-
const exportsToRemove = isServerFirstRoute ? [...SERVER_ONLY_ROUTE_EXPORTS, ...
|
|
1550
|
+
const exportsToRemove = isServerFirstRoute ? [...SERVER_ONLY_ROUTE_EXPORTS, ...CLIENT_COMPONENT_EXPORTS] : SERVER_ONLY_ROUTE_EXPORTS;
|
|
1478
1551
|
const clientRouteModuleAst = import_parser.parse(routeSource, {
|
|
1479
1552
|
sourceType: "module"
|
|
1480
1553
|
});
|
|
@@ -1534,6 +1607,32 @@ function isVirtualServerRouteModuleId(id) {
|
|
|
1534
1607
|
return /(\?|&)server-route-module(&|$)/.test(id);
|
|
1535
1608
|
}
|
|
1536
1609
|
|
|
1610
|
+
// vite/plugins/validate-plugin-order.ts
|
|
1611
|
+
function validatePluginOrder() {
|
|
1612
|
+
return {
|
|
1613
|
+
name: "react-router:validate-plugin-order",
|
|
1614
|
+
configResolved(viteConfig) {
|
|
1615
|
+
let pluginIndex = (pluginName) => {
|
|
1616
|
+
pluginName = Array.isArray(pluginName) ? pluginName : [pluginName];
|
|
1617
|
+
return viteConfig.plugins.findIndex(
|
|
1618
|
+
(plugin) => pluginName.includes(plugin.name)
|
|
1619
|
+
);
|
|
1620
|
+
};
|
|
1621
|
+
let rollupPrePlugins = [
|
|
1622
|
+
{ pluginName: "@mdx-js/rollup", displayName: "@mdx-js/rollup" }
|
|
1623
|
+
];
|
|
1624
|
+
for (let prePlugin of rollupPrePlugins) {
|
|
1625
|
+
let prePluginIndex = pluginIndex(prePlugin.pluginName);
|
|
1626
|
+
if (prePluginIndex >= 0 && prePluginIndex > pluginIndex(["react-router", "react-router/rsc"])) {
|
|
1627
|
+
throw new Error(
|
|
1628
|
+
`The "${prePlugin.displayName}" plugin should be placed before the React Router plugin in your Vite config file`
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1537
1636
|
// vite/rsc/plugin.ts
|
|
1538
1637
|
function reactRouterRSCVitePlugin() {
|
|
1539
1638
|
let configLoader;
|
|
@@ -1543,7 +1642,7 @@ function reactRouterRSCVitePlugin() {
|
|
|
1543
1642
|
let routeIdByFile;
|
|
1544
1643
|
return [
|
|
1545
1644
|
{
|
|
1546
|
-
name: "react-router/rsc
|
|
1645
|
+
name: "react-router/rsc",
|
|
1547
1646
|
async config(viteUserConfig, { command, mode }) {
|
|
1548
1647
|
await import_es_module_lexer2.init;
|
|
1549
1648
|
viteCommand = command;
|
|
@@ -1586,9 +1685,21 @@ function reactRouterRSCVitePlugin() {
|
|
|
1586
1685
|
jsxDev: viteCommand !== "build"
|
|
1587
1686
|
},
|
|
1588
1687
|
environments: {
|
|
1589
|
-
client: {
|
|
1590
|
-
|
|
1591
|
-
|
|
1688
|
+
client: {
|
|
1689
|
+
build: {
|
|
1690
|
+
outDir: (0, import_pathe5.join)(config.buildDirectory, "client")
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
rsc: {
|
|
1694
|
+
build: {
|
|
1695
|
+
outDir: (0, import_pathe5.join)(config.buildDirectory, "server")
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
ssr: {
|
|
1699
|
+
build: {
|
|
1700
|
+
outDir: (0, import_pathe5.join)(config.buildDirectory, "server/__ssr_build")
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1592
1703
|
},
|
|
1593
1704
|
build: {
|
|
1594
1705
|
rollupOptions: {
|
|
@@ -1660,7 +1771,14 @@ function reactRouterRSCVitePlugin() {
|
|
|
1660
1771
|
{
|
|
1661
1772
|
name: "react-router/rsc/virtual-route-modules",
|
|
1662
1773
|
transform(code, id) {
|
|
1663
|
-
|
|
1774
|
+
if (!routeIdByFile) return;
|
|
1775
|
+
return transformVirtualRouteModules({
|
|
1776
|
+
code,
|
|
1777
|
+
id,
|
|
1778
|
+
viteCommand,
|
|
1779
|
+
routeIdByFile,
|
|
1780
|
+
viteEnvironment: this.environment
|
|
1781
|
+
});
|
|
1664
1782
|
}
|
|
1665
1783
|
},
|
|
1666
1784
|
{
|
|
@@ -1721,8 +1839,8 @@ function reactRouterRSCVitePlugin() {
|
|
|
1721
1839
|
const isJSX = filepath.endsWith("x");
|
|
1722
1840
|
const useFastRefresh = !ssr && (isJSX || code.includes(devRuntime));
|
|
1723
1841
|
if (!useFastRefresh) return;
|
|
1724
|
-
|
|
1725
|
-
|
|
1842
|
+
if (isVirtualClientRouteModuleId(id)) {
|
|
1843
|
+
const routeId = routeIdByFile?.get(filepath);
|
|
1726
1844
|
return { code: addRefreshWrapper({ routeId, code, id }) };
|
|
1727
1845
|
}
|
|
1728
1846
|
const result = await babel.transformAsync(code, {
|
|
@@ -1783,6 +1901,7 @@ function reactRouterRSCVitePlugin() {
|
|
|
1783
1901
|
return modules;
|
|
1784
1902
|
}
|
|
1785
1903
|
},
|
|
1904
|
+
validatePluginOrder(),
|
|
1786
1905
|
(0, import_plugin_rsc.default)({ entries: getRscEntries() })
|
|
1787
1906
|
];
|
|
1788
1907
|
}
|
package/dist/routes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UNSAFE_MiddlewareEnabled,
|
|
1
|
+
import { UNSAFE_MiddlewareEnabled, RouterContextProvider, AppLoadContext } from 'react-router';
|
|
2
2
|
import { Plugin } from 'vite';
|
|
3
3
|
import { PlatformProxy, GetPlatformProxyOptions } from 'wrangler';
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ type LoadContext<Env, Cf extends CfProperties> = {
|
|
|
10
10
|
type GetLoadContext<Env, Cf extends CfProperties> = (args: {
|
|
11
11
|
request: Request;
|
|
12
12
|
context: LoadContext<Env, Cf>;
|
|
13
|
-
}) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<
|
|
13
|
+
}) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<RouterContextProvider> : MaybePromise<AppLoadContext>;
|
|
14
14
|
/**
|
|
15
15
|
* Vite plugin that provides [Node proxies to local workerd
|
|
16
16
|
* bindings](https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy)
|
package/dist/vite/cloudflare.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-426e5caec
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -573,7 +573,7 @@ async function resolveConfig({
|
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
let future = {
|
|
576
|
-
|
|
576
|
+
v8_middleware: reactRouterUserConfig.future?.v8_middleware ?? false,
|
|
577
577
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
578
578
|
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false,
|
|
579
579
|
unstable_subResourceIntegrity: reactRouterUserConfig.future?.unstable_subResourceIntegrity ?? false,
|
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-426e5caec
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -533,7 +533,7 @@ async function resolveConfig({
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
let future = {
|
|
536
|
-
|
|
536
|
+
v8_middleware: reactRouterUserConfig.future?.v8_middleware ?? false,
|
|
537
537
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
538
538
|
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false,
|
|
539
539
|
unstable_subResourceIntegrity: reactRouterUserConfig.future?.unstable_subResourceIntegrity ?? false,
|
|
@@ -883,7 +883,7 @@ function generateFuture(ctx) {
|
|
|
883
883
|
|
|
884
884
|
declare module "react-router" {
|
|
885
885
|
interface Future {
|
|
886
|
-
|
|
886
|
+
middleware: ${ctx.config.future.v8_middleware}
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
`;
|
|
@@ -1105,11 +1105,11 @@ function getRouteAnnotations({
|
|
|
1105
1105
|
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
1106
1106
|
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
1107
1107
|
|
|
1108
|
-
//
|
|
1109
|
-
export type
|
|
1108
|
+
// middleware
|
|
1109
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
1110
1110
|
|
|
1111
|
-
//
|
|
1112
|
-
export type
|
|
1111
|
+
// clientMiddleware
|
|
1112
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
1113
1113
|
|
|
1114
1114
|
// loader
|
|
1115
1115
|
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
@@ -2210,7 +2210,7 @@ function detectRouteChunks(code, cache, cacheKey) {
|
|
|
2210
2210
|
var routeChunkExportNames = [
|
|
2211
2211
|
"clientAction",
|
|
2212
2212
|
"clientLoader",
|
|
2213
|
-
"
|
|
2213
|
+
"clientMiddleware",
|
|
2214
2214
|
"HydrateFallback"
|
|
2215
2215
|
];
|
|
2216
2216
|
var mainChunkName = "main";
|
|
@@ -2226,7 +2226,7 @@ var routeChunkQueryStrings = {
|
|
|
2226
2226
|
main: `${routeChunkQueryStringPrefix}main`,
|
|
2227
2227
|
clientAction: `${routeChunkQueryStringPrefix}clientAction`,
|
|
2228
2228
|
clientLoader: `${routeChunkQueryStringPrefix}clientLoader`,
|
|
2229
|
-
|
|
2229
|
+
clientMiddleware: `${routeChunkQueryStringPrefix}clientMiddleware`,
|
|
2230
2230
|
HydrateFallback: `${routeChunkQueryStringPrefix}HydrateFallback`
|
|
2231
2231
|
};
|
|
2232
2232
|
function getRouteChunkModuleId(filePath, chunkName) {
|
|
@@ -2329,20 +2329,41 @@ function toFunctionExpression(decl) {
|
|
|
2329
2329
|
);
|
|
2330
2330
|
}
|
|
2331
2331
|
|
|
2332
|
+
// vite/plugins/validate-plugin-order.ts
|
|
2333
|
+
function validatePluginOrder() {
|
|
2334
|
+
return {
|
|
2335
|
+
name: "react-router:validate-plugin-order",
|
|
2336
|
+
configResolved(viteConfig) {
|
|
2337
|
+
let pluginIndex = (pluginName) => {
|
|
2338
|
+
pluginName = Array.isArray(pluginName) ? pluginName : [pluginName];
|
|
2339
|
+
return viteConfig.plugins.findIndex(
|
|
2340
|
+
(plugin) => pluginName.includes(plugin.name)
|
|
2341
|
+
);
|
|
2342
|
+
};
|
|
2343
|
+
let rollupPrePlugins = [
|
|
2344
|
+
{ pluginName: "@mdx-js/rollup", displayName: "@mdx-js/rollup" }
|
|
2345
|
+
];
|
|
2346
|
+
for (let prePlugin of rollupPrePlugins) {
|
|
2347
|
+
let prePluginIndex = pluginIndex(prePlugin.pluginName);
|
|
2348
|
+
if (prePluginIndex >= 0 && prePluginIndex > pluginIndex(["react-router", "react-router/rsc"])) {
|
|
2349
|
+
throw new Error(
|
|
2350
|
+
`The "${prePlugin.displayName}" plugin should be placed before the React Router plugin in your Vite config file`
|
|
2351
|
+
);
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2332
2358
|
// vite/plugin.ts
|
|
2333
2359
|
function extractPluginContext(viteConfig) {
|
|
2334
2360
|
return viteConfig["__reactRouterPluginContext"];
|
|
2335
2361
|
}
|
|
2336
|
-
var SERVER_ONLY_ROUTE_EXPORTS = [
|
|
2337
|
-
"loader",
|
|
2338
|
-
"action",
|
|
2339
|
-
"unstable_middleware",
|
|
2340
|
-
"headers"
|
|
2341
|
-
];
|
|
2362
|
+
var SERVER_ONLY_ROUTE_EXPORTS = ["loader", "action", "middleware", "headers"];
|
|
2342
2363
|
var CLIENT_NON_COMPONENT_EXPORTS = [
|
|
2343
2364
|
"clientAction",
|
|
2344
2365
|
"clientLoader",
|
|
2345
|
-
"
|
|
2366
|
+
"clientMiddleware",
|
|
2346
2367
|
"handle",
|
|
2347
2368
|
"meta",
|
|
2348
2369
|
"links",
|
|
@@ -2671,10 +2692,6 @@ var reactRouterVitePlugin = () => {
|
|
|
2671
2692
|
buildManifest
|
|
2672
2693
|
};
|
|
2673
2694
|
};
|
|
2674
|
-
let pluginIndex = (pluginName) => {
|
|
2675
|
-
invariant(viteConfig);
|
|
2676
|
-
return viteConfig.plugins.findIndex((plugin) => plugin.name === pluginName);
|
|
2677
|
-
};
|
|
2678
2695
|
let getServerEntry = async ({ routeIds }) => {
|
|
2679
2696
|
invariant(viteConfig, "viteconfig required to generate the server entry");
|
|
2680
2697
|
let routes = routeIds ? (
|
|
@@ -2829,9 +2846,7 @@ var reactRouterVitePlugin = () => {
|
|
|
2829
2846
|
let sourceExports = routeManifestExports[route.id];
|
|
2830
2847
|
let hasClientAction = sourceExports.includes("clientAction");
|
|
2831
2848
|
let hasClientLoader = sourceExports.includes("clientLoader");
|
|
2832
|
-
let hasClientMiddleware = sourceExports.includes(
|
|
2833
|
-
"unstable_clientMiddleware"
|
|
2834
|
-
);
|
|
2849
|
+
let hasClientMiddleware = sourceExports.includes("clientMiddleware");
|
|
2835
2850
|
let hasHydrateFallback = sourceExports.includes("HydrateFallback");
|
|
2836
2851
|
let { hasRouteChunkByExportName } = await detectRouteChunksIfEnabled(
|
|
2837
2852
|
cache,
|
|
@@ -2846,7 +2861,7 @@ var reactRouterVitePlugin = () => {
|
|
|
2846
2861
|
valid: {
|
|
2847
2862
|
clientAction: !hasClientAction || hasRouteChunkByExportName.clientAction,
|
|
2848
2863
|
clientLoader: !hasClientLoader || hasRouteChunkByExportName.clientLoader,
|
|
2849
|
-
|
|
2864
|
+
clientMiddleware: !hasClientMiddleware || hasRouteChunkByExportName.clientMiddleware,
|
|
2850
2865
|
HydrateFallback: !hasHydrateFallback || hasRouteChunkByExportName.HydrateFallback
|
|
2851
2866
|
}
|
|
2852
2867
|
});
|
|
@@ -2880,10 +2895,10 @@ var reactRouterVitePlugin = () => {
|
|
|
2880
2895
|
viteManifest,
|
|
2881
2896
|
getRouteChunkModuleId(routeFile, "clientLoader")
|
|
2882
2897
|
) : void 0,
|
|
2883
|
-
clientMiddlewareModule: hasRouteChunkByExportName.
|
|
2898
|
+
clientMiddlewareModule: hasRouteChunkByExportName.clientMiddleware ? getPublicModulePathForEntry(
|
|
2884
2899
|
ctx,
|
|
2885
2900
|
viteManifest,
|
|
2886
|
-
getRouteChunkModuleId(routeFile, "
|
|
2901
|
+
getRouteChunkModuleId(routeFile, "clientMiddleware")
|
|
2887
2902
|
) : void 0,
|
|
2888
2903
|
hydrateFallbackModule: hasRouteChunkByExportName.HydrateFallback ? getPublicModulePathForEntry(
|
|
2889
2904
|
ctx,
|
|
@@ -2942,9 +2957,7 @@ var reactRouterVitePlugin = () => {
|
|
|
2942
2957
|
let sourceExports = routeManifestExports[key];
|
|
2943
2958
|
let hasClientAction = sourceExports.includes("clientAction");
|
|
2944
2959
|
let hasClientLoader = sourceExports.includes("clientLoader");
|
|
2945
|
-
let hasClientMiddleware = sourceExports.includes(
|
|
2946
|
-
"unstable_clientMiddleware"
|
|
2947
|
-
);
|
|
2960
|
+
let hasClientMiddleware = sourceExports.includes("clientMiddleware");
|
|
2948
2961
|
let hasHydrateFallback = sourceExports.includes("HydrateFallback");
|
|
2949
2962
|
let routeModulePath = combineURLs(
|
|
2950
2963
|
ctx.publicPath,
|
|
@@ -2966,7 +2979,7 @@ var reactRouterVitePlugin = () => {
|
|
|
2966
2979
|
valid: {
|
|
2967
2980
|
clientAction: !hasClientAction || hasRouteChunkByExportName.clientAction,
|
|
2968
2981
|
clientLoader: !hasClientLoader || hasRouteChunkByExportName.clientLoader,
|
|
2969
|
-
|
|
2982
|
+
clientMiddleware: !hasClientMiddleware || hasRouteChunkByExportName.clientMiddleware,
|
|
2970
2983
|
HydrateFallback: !hasHydrateFallback || hasRouteChunkByExportName.HydrateFallback
|
|
2971
2984
|
}
|
|
2972
2985
|
});
|
|
@@ -3238,17 +3251,6 @@ var reactRouterVitePlugin = () => {
|
|
|
3238
3251
|
childCompilerConfigFile,
|
|
3239
3252
|
"Vite config file was unable to be resolved for React Router child compiler"
|
|
3240
3253
|
);
|
|
3241
|
-
let rollupPrePlugins = [
|
|
3242
|
-
{ pluginName: "@mdx-js/rollup", displayName: "@mdx-js/rollup" }
|
|
3243
|
-
];
|
|
3244
|
-
for (let prePlugin of rollupPrePlugins) {
|
|
3245
|
-
let prePluginIndex = pluginIndex(prePlugin.pluginName);
|
|
3246
|
-
if (prePluginIndex >= 0 && prePluginIndex > pluginIndex("react-router")) {
|
|
3247
|
-
throw new Error(
|
|
3248
|
-
`The "${prePlugin.displayName}" plugin should be placed before the React Router plugin in your Vite config file`
|
|
3249
|
-
);
|
|
3250
|
-
}
|
|
3251
|
-
}
|
|
3252
3254
|
const childCompilerPlugins = await asyncFlatten(
|
|
3253
3255
|
childCompilerConfigFile.config.plugins ?? []
|
|
3254
3256
|
);
|
|
@@ -3266,7 +3268,7 @@ var reactRouterVitePlugin = () => {
|
|
|
3266
3268
|
envFile: false,
|
|
3267
3269
|
plugins: [
|
|
3268
3270
|
childCompilerPlugins.filter(
|
|
3269
|
-
(plugin) => typeof plugin === "object" && plugin !== null && "name" in plugin && plugin.name !== "react-router" && plugin.name !== "react-router:route-exports" && plugin.name !== "react-router:hmr-updates"
|
|
3271
|
+
(plugin) => typeof plugin === "object" && plugin !== null && "name" in plugin && plugin.name !== "react-router" && plugin.name !== "react-router:route-exports" && plugin.name !== "react-router:hmr-updates" && plugin.name !== "react-router:validate-plugin-order"
|
|
3270
3272
|
).map((plugin) => ({
|
|
3271
3273
|
...plugin,
|
|
3272
3274
|
configureServer: void 0,
|
|
@@ -3645,9 +3647,7 @@ var reactRouterVitePlugin = () => {
|
|
|
3645
3647
|
valid: {
|
|
3646
3648
|
clientAction: !exportNames.includes("clientAction"),
|
|
3647
3649
|
clientLoader: !exportNames.includes("clientLoader"),
|
|
3648
|
-
|
|
3649
|
-
"unstable_clientMiddleware"
|
|
3650
|
-
),
|
|
3650
|
+
clientMiddleware: !exportNames.includes("clientMiddleware"),
|
|
3651
3651
|
HydrateFallback: !exportNames.includes("HydrateFallback")
|
|
3652
3652
|
}
|
|
3653
3653
|
});
|
|
@@ -3955,7 +3955,8 @@ var reactRouterVitePlugin = () => {
|
|
|
3955
3955
|
server.environments.client.reloadModule(clientModule);
|
|
3956
3956
|
}
|
|
3957
3957
|
}
|
|
3958
|
-
}
|
|
3958
|
+
},
|
|
3959
|
+
validatePluginOrder()
|
|
3959
3960
|
];
|
|
3960
3961
|
};
|
|
3961
3962
|
function getParentClientNodes(clientModuleGraph, module2) {
|
|
@@ -4073,13 +4074,13 @@ async function getRouteMetadata(cache, ctx, viteChildCompiler, route, readRouteF
|
|
|
4073
4074
|
// Ensure the Vite dev server responds with a JS module
|
|
4074
4075
|
clientActionModule: hasRouteChunkByExportName.clientAction ? `${getRouteChunkModuleId(moduleUrl, "clientAction")}` : void 0,
|
|
4075
4076
|
clientLoaderModule: hasRouteChunkByExportName.clientLoader ? `${getRouteChunkModuleId(moduleUrl, "clientLoader")}` : void 0,
|
|
4076
|
-
clientMiddlewareModule: hasRouteChunkByExportName.
|
|
4077
|
+
clientMiddlewareModule: hasRouteChunkByExportName.clientMiddleware ? `${getRouteChunkModuleId(moduleUrl, "clientMiddleware")}` : void 0,
|
|
4077
4078
|
hydrateFallbackModule: hasRouteChunkByExportName.HydrateFallback ? `${getRouteChunkModuleId(moduleUrl, "HydrateFallback")}` : void 0,
|
|
4078
4079
|
hasAction: sourceExports.includes("action"),
|
|
4079
4080
|
hasClientAction: sourceExports.includes("clientAction"),
|
|
4080
4081
|
hasLoader: sourceExports.includes("loader"),
|
|
4081
4082
|
hasClientLoader: sourceExports.includes("clientLoader"),
|
|
4082
|
-
hasClientMiddleware: sourceExports.includes("
|
|
4083
|
+
hasClientMiddleware: sourceExports.includes("clientMiddleware"),
|
|
4083
4084
|
hasErrorBoundary: sourceExports.includes("ErrorBoundary"),
|
|
4084
4085
|
imports: []
|
|
4085
4086
|
};
|
|
@@ -4527,7 +4528,7 @@ async function detectRouteChunksIfEnabled(cache, ctx, id, input) {
|
|
|
4527
4528
|
hasRouteChunkByExportName: {
|
|
4528
4529
|
clientAction: false,
|
|
4529
4530
|
clientLoader: false,
|
|
4530
|
-
|
|
4531
|
+
clientMiddleware: false,
|
|
4531
4532
|
HydrateFallback: false
|
|
4532
4533
|
}
|
|
4533
4534
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-426e5caec",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"tinyglobby": "^0.2.14",
|
|
92
92
|
"valibot": "^0.41.0",
|
|
93
93
|
"vite-node": "^3.2.2",
|
|
94
|
-
"@react-router/node": "0.0.0-experimental-
|
|
94
|
+
"@react-router/node": "0.0.0-experimental-426e5caec"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@types/babel__core": "^7.20.5",
|
|
@@ -114,15 +114,15 @@
|
|
|
114
114
|
"vite": "^6.1.0",
|
|
115
115
|
"wireit": "0.14.9",
|
|
116
116
|
"wrangler": "^4.23.0",
|
|
117
|
-
"@react-router/serve": "0.0.0-experimental-
|
|
118
|
-
"react-router": "^0.0.0-experimental-
|
|
117
|
+
"@react-router/serve": "0.0.0-experimental-426e5caec",
|
|
118
|
+
"react-router": "^0.0.0-experimental-426e5caec"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"typescript": "^5.1.0",
|
|
122
122
|
"vite": "^5.1.0 || ^6.0.0 || ^7.0.0",
|
|
123
123
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
124
|
-
"react-router": "^0.0.0-experimental-
|
|
125
|
-
"
|
|
124
|
+
"@react-router/serve": "^0.0.0-experimental-426e5caec",
|
|
125
|
+
"react-router": "^0.0.0-experimental-426e5caec"
|
|
126
126
|
},
|
|
127
127
|
"peerDependenciesMeta": {
|
|
128
128
|
"@react-router/serve": {
|