@react-router/dev 0.0.0-experimental-f8522255d → 0.0.0-experimental-6f53aff26
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 +11 -0
- package/dist/cli/index.js +1 -1
- package/dist/config/default-rsc-entries/entry.rsc.tsx +33 -11
- package/dist/config/default-rsc-entries/entry.ssr.tsx +20 -13
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.js +47 -49
- package/package.json +12 -6
- package/rsc-types.d.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## 7.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Import ESM package `pkg-types` with a dynamic `import()` to fix issues on Node 20.18 ([#14624](https://github.com/remix-run/react-router/pull/14624))
|
|
8
|
+
- Update `valibot` dependency to `^1.2.0` to address [GHSA-vqpr-j7v3-hqw9](https://github.com/advisories/GHSA-vqpr-j7v3-hqw9) ([#14608](https://github.com/remix-run/react-router/pull/14608))
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- `react-router@7.10.1`
|
|
11
|
+
- `@react-router/node@7.10.1`
|
|
12
|
+
- `@react-router/serve@7.10.1`
|
|
13
|
+
|
|
3
14
|
## 7.10.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/cli/index.js
CHANGED
|
@@ -6,22 +6,36 @@ import {
|
|
|
6
6
|
loadServerAction,
|
|
7
7
|
renderToReadableStream,
|
|
8
8
|
} from "@vitejs/plugin-rsc/rsc";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
RouterContextProvider,
|
|
11
|
+
unstable_matchRSCServerRequest as matchRSCServerRequest,
|
|
12
|
+
} from "react-router";
|
|
10
13
|
|
|
14
|
+
// Import the routes generated by routes.ts
|
|
11
15
|
import routes from "virtual:react-router/unstable_rsc/routes";
|
|
12
16
|
import basename from "virtual:react-router/unstable_rsc/basename";
|
|
13
17
|
import unstable_reactRouterServeConfig from "virtual:react-router/unstable_rsc/react-router-serve-config";
|
|
14
18
|
|
|
15
|
-
export
|
|
16
|
-
|
|
19
|
+
export { unstable_reactRouterServeConfig };
|
|
20
|
+
|
|
21
|
+
export function fetchServer(
|
|
22
|
+
request: Request,
|
|
23
|
+
requestContext?: RouterContextProvider,
|
|
24
|
+
) {
|
|
25
|
+
return matchRSCServerRequest({
|
|
26
|
+
basename,
|
|
27
|
+
// Provide the React Server touchpoints.
|
|
17
28
|
createTemporaryReferenceSet,
|
|
18
29
|
decodeAction,
|
|
19
30
|
decodeFormState,
|
|
20
31
|
decodeReply,
|
|
21
32
|
loadServerAction,
|
|
33
|
+
// The incoming request.
|
|
22
34
|
request,
|
|
35
|
+
requestContext,
|
|
36
|
+
// The app routes.
|
|
23
37
|
routes,
|
|
24
|
-
|
|
38
|
+
// Encode the match with the React Server implementation.
|
|
25
39
|
generateResponse(match, options) {
|
|
26
40
|
return new Response(renderToReadableStream(match.payload, options), {
|
|
27
41
|
status: match.statusCode,
|
|
@@ -31,14 +45,22 @@ export async function fetchServer(request: Request) {
|
|
|
31
45
|
});
|
|
32
46
|
}
|
|
33
47
|
|
|
34
|
-
export {
|
|
48
|
+
export default {
|
|
49
|
+
async fetch(request: Request, requestContext?: RouterContextProvider) {
|
|
50
|
+
if (requestContext && !(requestContext instanceof RouterContextProvider)) {
|
|
51
|
+
requestContext = undefined;
|
|
52
|
+
}
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
const ssr = await import.meta.viteRsc.loadModule<
|
|
55
|
+
typeof import("./entry.ssr.tsx")
|
|
56
|
+
>("ssr", "index");
|
|
57
|
+
|
|
58
|
+
return await ssr.generateHTML(
|
|
59
|
+
request,
|
|
60
|
+
await fetchServer(request, requestContext),
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
42
64
|
|
|
43
65
|
if (import.meta.hot) {
|
|
44
66
|
import.meta.hot.accept();
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import { createFromReadableStream } from "@vitejs/plugin-rsc/ssr";
|
|
2
|
-
// @ts-expect-error
|
|
3
|
-
import
|
|
2
|
+
// @ts-expect-error - no types for this, can import from root once on latest 19
|
|
3
|
+
import { renderToReadableStream } from "react-dom/server.edge";
|
|
4
4
|
import {
|
|
5
|
-
unstable_RSCStaticRouter as RSCStaticRouter,
|
|
6
5
|
unstable_routeRSCServerRequest as routeRSCServerRequest,
|
|
6
|
+
unstable_RSCStaticRouter as RSCStaticRouter,
|
|
7
7
|
} from "react-router";
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export async function generateHTML(
|
|
10
10
|
request: Request,
|
|
11
11
|
serverResponse: Response,
|
|
12
|
-
) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return routeRSCServerRequest({
|
|
12
|
+
): Promise<Response> {
|
|
13
|
+
return await routeRSCServerRequest({
|
|
14
|
+
// The incoming request.
|
|
17
15
|
request,
|
|
16
|
+
// The response from the RSC server.
|
|
18
17
|
serverResponse,
|
|
18
|
+
// Provide the React Server touchpoints.
|
|
19
19
|
createFromReadableStream,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// Render the router to HTML.
|
|
21
|
+
async renderHTML(getPayload, options) {
|
|
22
|
+
const payload = await getPayload();
|
|
23
|
+
const formState =
|
|
24
|
+
payload.type === "render" ? await payload.formState : undefined;
|
|
25
|
+
|
|
26
|
+
const bootstrapScriptContent =
|
|
27
|
+
await import.meta.viteRsc.loadBootstrapScriptContent("index");
|
|
22
28
|
|
|
23
|
-
return
|
|
29
|
+
return await renderToReadableStream(
|
|
24
30
|
<RSCStaticRouter getPayload={getPayload} />,
|
|
25
31
|
{
|
|
32
|
+
...options,
|
|
26
33
|
bootstrapScriptContent,
|
|
34
|
+
formState,
|
|
27
35
|
signal: request.signal,
|
|
28
|
-
formState: await payload.formState,
|
|
29
36
|
},
|
|
30
37
|
);
|
|
31
38
|
},
|
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
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-6f53aff26
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -639,11 +639,11 @@ async function createConfigLoader({
|
|
|
639
639
|
fsWatcher = import_chokidar.default.watch([root, appDirectory], {
|
|
640
640
|
ignoreInitial: true,
|
|
641
641
|
ignored: (path9) => {
|
|
642
|
-
let
|
|
643
|
-
return !
|
|
642
|
+
let dirname4 = import_pathe3.default.dirname(path9);
|
|
643
|
+
return !dirname4.startsWith(appDirectory) && // Ensure we're only watching files outside of the app directory
|
|
644
644
|
// that are at the root level, not nested in subdirectories
|
|
645
645
|
path9 !== root && // Watch the root directory itself
|
|
646
|
-
|
|
646
|
+
dirname4 !== root;
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
fsWatcher.on("all", async (...args) => {
|
|
@@ -775,6 +775,30 @@ async function resolveEntryFiles({
|
|
|
775
775
|
let entryServerFilePath = userEntryServerFile ? import_pathe3.default.resolve(reactRouterConfig.appDirectory, userEntryServerFile) : import_pathe3.default.resolve(defaultsDirectory, entryServerFile);
|
|
776
776
|
return { entryClientFilePath, entryServerFilePath };
|
|
777
777
|
}
|
|
778
|
+
async function resolveRSCEntryFiles({
|
|
779
|
+
reactRouterConfig
|
|
780
|
+
}) {
|
|
781
|
+
let { appDirectory } = reactRouterConfig;
|
|
782
|
+
let defaultsDirectory = import_pathe3.default.resolve(
|
|
783
|
+
import_pathe3.default.dirname(require.resolve("@react-router/dev/package.json")),
|
|
784
|
+
"dist",
|
|
785
|
+
"config",
|
|
786
|
+
"default-rsc-entries"
|
|
787
|
+
);
|
|
788
|
+
let userEntryClientFile = findEntry(appDirectory, "entry.client", {
|
|
789
|
+
absolute: true
|
|
790
|
+
});
|
|
791
|
+
let userEntryRSCFile = findEntry(appDirectory, "entry.rsc", {
|
|
792
|
+
absolute: true
|
|
793
|
+
});
|
|
794
|
+
let userEntrySSRFile = findEntry(appDirectory, "entry.ssr", {
|
|
795
|
+
absolute: true
|
|
796
|
+
});
|
|
797
|
+
let client = userEntryClientFile ?? import_pathe3.default.join(defaultsDirectory, "entry.client.tsx");
|
|
798
|
+
let rsc = userEntryRSCFile ?? import_pathe3.default.join(defaultsDirectory, "entry.rsc.tsx");
|
|
799
|
+
let ssr = userEntrySSRFile ?? import_pathe3.default.join(defaultsDirectory, "entry.ssr.tsx");
|
|
800
|
+
return { client, rsc, ssr };
|
|
801
|
+
}
|
|
778
802
|
function omitRoutes(config) {
|
|
779
803
|
return {
|
|
780
804
|
...config,
|
|
@@ -5014,7 +5038,6 @@ var import_es_module_lexer3 = require("es-module-lexer");
|
|
|
5014
5038
|
var Path5 = __toESM(require("pathe"));
|
|
5015
5039
|
var babel2 = __toESM(require("@babel/core"));
|
|
5016
5040
|
var import_picocolors5 = __toESM(require("picocolors"));
|
|
5017
|
-
var import_fs = require("fs");
|
|
5018
5041
|
var import_promises3 = require("fs/promises");
|
|
5019
5042
|
var import_pathe6 = __toESM(require("pathe"));
|
|
5020
5043
|
|
|
@@ -5355,7 +5378,7 @@ function reactRouterRSCVitePlugin() {
|
|
|
5355
5378
|
let resolvedViteConfig;
|
|
5356
5379
|
let routeIdByFile;
|
|
5357
5380
|
let logger;
|
|
5358
|
-
|
|
5381
|
+
let entries;
|
|
5359
5382
|
let config;
|
|
5360
5383
|
let rootRouteFile;
|
|
5361
5384
|
function updateConfig(newConfig) {
|
|
@@ -5418,6 +5441,9 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5418
5441
|
logger = vite2.createLogger(viteUserConfig.logLevel, {
|
|
5419
5442
|
prefix: "[react-router]"
|
|
5420
5443
|
});
|
|
5444
|
+
entries = await resolveRSCEntryFiles({
|
|
5445
|
+
reactRouterConfig: config
|
|
5446
|
+
});
|
|
5421
5447
|
return {
|
|
5422
5448
|
resolve: {
|
|
5423
5449
|
dedupe: [
|
|
@@ -5433,7 +5459,7 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5433
5459
|
},
|
|
5434
5460
|
optimizeDeps: {
|
|
5435
5461
|
entries: getOptimizeDepsEntries({
|
|
5436
|
-
entryClientFilePath:
|
|
5462
|
+
entryClientFilePath: entries.client,
|
|
5437
5463
|
reactRouterConfig: config
|
|
5438
5464
|
}),
|
|
5439
5465
|
esbuildOptions: {
|
|
@@ -5460,7 +5486,7 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5460
5486
|
build: {
|
|
5461
5487
|
rollupOptions: {
|
|
5462
5488
|
input: {
|
|
5463
|
-
index:
|
|
5489
|
+
index: entries.client
|
|
5464
5490
|
}
|
|
5465
5491
|
},
|
|
5466
5492
|
outDir: (0, import_pathe6.join)(config.buildDirectory, "client")
|
|
@@ -5476,11 +5502,7 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5476
5502
|
build: {
|
|
5477
5503
|
rollupOptions: {
|
|
5478
5504
|
input: {
|
|
5479
|
-
|
|
5480
|
-
// it as `virtual:react-router/unstable_rsc/rsc-entry`
|
|
5481
|
-
// without needing to know the actual file path, which is
|
|
5482
|
-
// important when using the default entries.
|
|
5483
|
-
index: defaultEntries2.rsc
|
|
5505
|
+
index: entries.rsc
|
|
5484
5506
|
},
|
|
5485
5507
|
output: {
|
|
5486
5508
|
entryFileNames: config.serverBuildFile,
|
|
@@ -5488,13 +5510,18 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5488
5510
|
}
|
|
5489
5511
|
},
|
|
5490
5512
|
outDir: (0, import_pathe6.join)(config.buildDirectory, "server")
|
|
5513
|
+
},
|
|
5514
|
+
resolve: {
|
|
5515
|
+
noExternal: [
|
|
5516
|
+
"@react-router/dev/config/default-rsc-entries/entry.ssr"
|
|
5517
|
+
]
|
|
5491
5518
|
}
|
|
5492
5519
|
},
|
|
5493
5520
|
ssr: {
|
|
5494
5521
|
build: {
|
|
5495
5522
|
rollupOptions: {
|
|
5496
5523
|
input: {
|
|
5497
|
-
index:
|
|
5524
|
+
index: entries.ssr
|
|
5498
5525
|
},
|
|
5499
5526
|
output: {
|
|
5500
5527
|
// Note: We don't set `entryFileNames` here because it's
|
|
@@ -5505,6 +5532,11 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5505
5532
|
}
|
|
5506
5533
|
},
|
|
5507
5534
|
outDir: (0, import_pathe6.join)(config.buildDirectory, "server/__ssr_build")
|
|
5535
|
+
},
|
|
5536
|
+
resolve: {
|
|
5537
|
+
noExternal: [
|
|
5538
|
+
"@react-router/dev/config/default-rsc-entries/entry.rsc"
|
|
5539
|
+
]
|
|
5508
5540
|
}
|
|
5509
5541
|
}
|
|
5510
5542
|
},
|
|
@@ -5608,12 +5640,6 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5608
5640
|
(await typegenWatcherPromise)?.close();
|
|
5609
5641
|
}
|
|
5610
5642
|
},
|
|
5611
|
-
{
|
|
5612
|
-
name: "react-router/rsc/virtual-rsc-entry",
|
|
5613
|
-
resolveId(id) {
|
|
5614
|
-
if (id === virtual2.rscEntry.id) return defaultEntries2.rsc;
|
|
5615
|
-
}
|
|
5616
|
-
},
|
|
5617
5643
|
{
|
|
5618
5644
|
name: "react-router/rsc/virtual-route-config",
|
|
5619
5645
|
resolveId(id) {
|
|
@@ -5689,7 +5715,7 @@ ${errors.map((x) => ` - ${x}`).join("\n")}
|
|
|
5689
5715
|
const reactRefreshDir = import_pathe6.default.dirname(
|
|
5690
5716
|
require.resolve("react-refresh/package.json")
|
|
5691
5717
|
);
|
|
5692
|
-
const reactRefreshRuntimePath = import_pathe6.
|
|
5718
|
+
const reactRefreshRuntimePath = (0, import_pathe6.join)(
|
|
5693
5719
|
reactRefreshDir,
|
|
5694
5720
|
"cjs/react-refresh-runtime.development.js"
|
|
5695
5721
|
);
|
|
@@ -5816,7 +5842,6 @@ var virtual2 = {
|
|
|
5816
5842
|
injectHmrRuntime: create("unstable_rsc/inject-hmr-runtime"),
|
|
5817
5843
|
hmrRuntime: create("unstable_rsc/runtime"),
|
|
5818
5844
|
basename: create("unstable_rsc/basename"),
|
|
5819
|
-
rscEntry: create("unstable_rsc/rsc-entry"),
|
|
5820
5845
|
reactRouterServeConfig: create("unstable_rsc/react-router-serve-config")
|
|
5821
5846
|
};
|
|
5822
5847
|
function invalidateVirtualModules2(viteDevServer) {
|
|
@@ -5832,33 +5857,6 @@ function invalidateVirtualModules2(viteDevServer) {
|
|
|
5832
5857
|
function getRootDirectory(viteUserConfig) {
|
|
5833
5858
|
return viteUserConfig.root ?? process.env.REACT_ROUTER_ROOT ?? process.cwd();
|
|
5834
5859
|
}
|
|
5835
|
-
function getDevPackageRoot() {
|
|
5836
|
-
const currentDir = (0, import_pathe6.dirname)(__dirname);
|
|
5837
|
-
let dir = currentDir;
|
|
5838
|
-
while (dir !== (0, import_pathe6.dirname)(dir)) {
|
|
5839
|
-
try {
|
|
5840
|
-
const packageJsonPath = (0, import_pathe6.join)(dir, "package.json");
|
|
5841
|
-
(0, import_fs.readFileSync)(packageJsonPath, "utf-8");
|
|
5842
|
-
return dir;
|
|
5843
|
-
} catch {
|
|
5844
|
-
dir = (0, import_pathe6.dirname)(dir);
|
|
5845
|
-
}
|
|
5846
|
-
}
|
|
5847
|
-
throw new Error("Could not find package.json");
|
|
5848
|
-
}
|
|
5849
|
-
function getDefaultEntries() {
|
|
5850
|
-
const defaultEntriesDir2 = (0, import_pathe6.join)(
|
|
5851
|
-
getDevPackageRoot(),
|
|
5852
|
-
"dist",
|
|
5853
|
-
"config",
|
|
5854
|
-
"default-rsc-entries"
|
|
5855
|
-
);
|
|
5856
|
-
return {
|
|
5857
|
-
rsc: (0, import_pathe6.join)(defaultEntriesDir2, "entry.rsc.tsx"),
|
|
5858
|
-
ssr: (0, import_pathe6.join)(defaultEntriesDir2, "entry.ssr.tsx"),
|
|
5859
|
-
client: (0, import_pathe6.join)(defaultEntriesDir2, "entry.client.tsx")
|
|
5860
|
-
};
|
|
5861
|
-
}
|
|
5862
5860
|
function getModulesWithImporters(modules) {
|
|
5863
5861
|
const visited = /* @__PURE__ */ new Set();
|
|
5864
5862
|
const result = /* @__PURE__ */ new Set();
|
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-6f53aff26",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"exports": {
|
|
16
|
+
"./config/default-rsc-entries/entry.client": "./dist/config/default-rsc-entries/entry.client.tsx",
|
|
17
|
+
"./config/default-rsc-entries/entry.rsc": "./dist/config/default-rsc-entries/entry.rsc.tsx",
|
|
18
|
+
"./config/default-rsc-entries/entry.ssr": "./dist/config/default-rsc-entries/entry.ssr.tsx",
|
|
16
19
|
"./config": {
|
|
17
20
|
"types": "./dist/config.d.ts",
|
|
18
21
|
"default": "./dist/config.js"
|
|
@@ -21,6 +24,7 @@
|
|
|
21
24
|
"types": "./dist/routes.d.ts",
|
|
22
25
|
"default": "./dist/routes.js"
|
|
23
26
|
},
|
|
27
|
+
"./rsc-types": "./rsc-types.d.ts",
|
|
24
28
|
"./vite": {
|
|
25
29
|
"types": "./dist/vite.d.ts",
|
|
26
30
|
"default": "./dist/vite.js"
|
|
@@ -87,7 +91,7 @@
|
|
|
87
91
|
"tinyglobby": "^0.2.14",
|
|
88
92
|
"valibot": "^1.2.0",
|
|
89
93
|
"vite-node": "^3.2.2",
|
|
90
|
-
"@react-router/node": "0.0.0-experimental-
|
|
94
|
+
"@react-router/node": "0.0.0-experimental-6f53aff26"
|
|
91
95
|
},
|
|
92
96
|
"devDependencies": {
|
|
93
97
|
"@types/babel__core": "^7.20.5",
|
|
@@ -95,6 +99,7 @@
|
|
|
95
99
|
"@types/babel__traverse": "^7.20.7",
|
|
96
100
|
"@types/dedent": "^0.7.0",
|
|
97
101
|
"@types/express": "^4.17.9",
|
|
102
|
+
"@types/jest": "^29.5.4",
|
|
98
103
|
"@types/jsesc": "^3.0.1",
|
|
99
104
|
"@types/lodash": "^4.14.182",
|
|
100
105
|
"@types/node": "^20.0.0",
|
|
@@ -110,16 +115,16 @@
|
|
|
110
115
|
"vite": "^6.3.0",
|
|
111
116
|
"wireit": "0.14.9",
|
|
112
117
|
"wrangler": "^4.23.0",
|
|
113
|
-
"react-router": "
|
|
114
|
-
"
|
|
118
|
+
"@react-router/serve": "0.0.0-experimental-6f53aff26",
|
|
119
|
+
"react-router": "^0.0.0-experimental-6f53aff26"
|
|
115
120
|
},
|
|
116
121
|
"peerDependencies": {
|
|
117
122
|
"@vitejs/plugin-rsc": "*",
|
|
118
123
|
"typescript": "^5.1.0",
|
|
119
124
|
"vite": "^5.1.0 || ^6.0.0 || ^7.0.0",
|
|
120
125
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
121
|
-
"@react-router/serve": "^0.0.0-experimental-
|
|
122
|
-
"react-router": "^0.0.0-experimental-
|
|
126
|
+
"@react-router/serve": "^0.0.0-experimental-6f53aff26",
|
|
127
|
+
"react-router": "^0.0.0-experimental-6f53aff26"
|
|
123
128
|
},
|
|
124
129
|
"peerDependenciesMeta": {
|
|
125
130
|
"@vitejs/plugin-rsc": {
|
|
@@ -142,6 +147,7 @@
|
|
|
142
147
|
"dist/",
|
|
143
148
|
"module-sync-enabled/",
|
|
144
149
|
"bin.js",
|
|
150
|
+
"rsc-types.d.ts",
|
|
145
151
|
"CHANGELOG.md",
|
|
146
152
|
"LICENSE.md",
|
|
147
153
|
"README.md"
|
package/rsc-types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare module "virtual:react-router/unstable_rsc/routes" {
|
|
2
|
+
import type { unstable_RSCRouteConfig as RSCRouteConfig } from "react-router";
|
|
3
|
+
|
|
4
|
+
const routes: RSCRouteConfig;
|
|
5
|
+
export default routes;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "virtual:react-router/unstable_rsc/basename" {
|
|
9
|
+
const basename: string;
|
|
10
|
+
export default basename;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module "virtual:react-router/unstable_rsc/react-router-serve-config" {
|
|
14
|
+
const unstable_reactRouterServeConfig: {
|
|
15
|
+
publicPath: string;
|
|
16
|
+
assetsBuildDirectory: string;
|
|
17
|
+
};
|
|
18
|
+
export default unstable_reactRouterServeConfig;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare module "virtual:react-router/unstable_rsc/inject-hmr-runtime" {}
|