@react-router/dev 0.0.0-experimental-f7761f1cd → 0.0.0-experimental-8cee090e4
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/{build-_VgN3Fs2.js → build-B3Cfdu0l.js} +2 -2
- package/dist/cli/index.js +4 -4
- package/dist/config.js +1 -1
- package/dist/{dev-Cx78re5_.js → dev-CJPpPQeG.js} +2 -2
- package/dist/{routes-Craztzkd.js → routes-sm_wl6yW.js} +1 -1
- package/dist/routes.js +2 -2
- package/dist/{typegen-DrKkP7mg.js → typegen-DTHWSW2W.js} +2 -2
- package/dist/vite.js +41 -11
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { g as preloadVite, h as getVite } from "./typegen-
|
|
11
|
+
import { g as preloadVite, h as getVite } from "./typegen-DTHWSW2W.js";
|
|
12
12
|
//#region vite/build.ts
|
|
13
13
|
async function build(root, viteBuildOptions) {
|
|
14
14
|
await preloadVite();
|
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-8cee090e4
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @license MIT
|
|
11
11
|
*/
|
|
12
|
-
import { g as preloadVite, h as getVite, l as loadConfig, n as watch, t as run$1 } from "../typegen-
|
|
12
|
+
import { g as preloadVite, h as getVite, l as loadConfig, n as watch, t as run$1 } from "../typegen-DTHWSW2W.js";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
14
|
import fs, { existsSync } from "node:fs";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
@@ -141,7 +141,7 @@ async function routes(rootDirectory, flags = {}) {
|
|
|
141
141
|
}
|
|
142
142
|
async function build(root, options = {}) {
|
|
143
143
|
root = resolveRootDirectory(root, options);
|
|
144
|
-
let { build } = await import("../build-
|
|
144
|
+
let { build } = await import("../build-B3Cfdu0l.js");
|
|
145
145
|
if (options.profile) await start();
|
|
146
146
|
try {
|
|
147
147
|
await build(root, options);
|
|
@@ -150,7 +150,7 @@ async function build(root, options = {}) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
async function dev(root, options = {}) {
|
|
153
|
-
let { dev } = await import("../dev-
|
|
153
|
+
let { dev } = await import("../dev-CJPpPQeG.js");
|
|
154
154
|
if (options.profile) await start();
|
|
155
155
|
exitHook(() => stop(console.info));
|
|
156
156
|
root = resolveRootDirectory(root, options);
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { g as preloadVite, h as getVite } from "./typegen-
|
|
11
|
+
import { g as preloadVite, h as getVite } from "./typegen-DTHWSW2W.js";
|
|
12
12
|
import { n as start, r as stop, t as getSession } from "./cli/index.js";
|
|
13
13
|
import colors from "picocolors";
|
|
14
14
|
//#region vite/dev.ts
|
package/dist/routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { a as prefix, i as layout, n as getAppDirectory, o as relative, r as index, s as route } from "./routes-
|
|
11
|
+
import { a as prefix, i as layout, n as getAppDirectory, o as relative, r as index, s as route } from "./routes-sm_wl6yW.js";
|
|
12
12
|
export { getAppDirectory, index, layout, prefix, relative, route };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { c as setAppDirectory, l as validateRouteConfig, t as configRoutesToRouteManifest, u as invariant } from "./routes-
|
|
11
|
+
import { c as setAppDirectory, l as validateRouteConfig, t as configRoutesToRouteManifest, u as invariant } from "./routes-sm_wl6yW.js";
|
|
12
12
|
import { createRequire } from "node:module";
|
|
13
13
|
import fs from "node:fs";
|
|
14
14
|
import colors from "picocolors";
|
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-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { a as t, c as createConfigLoader, d as resolveRSCEntryFiles, f as ssrExternals, g as preloadVite, h as getVite, i as parse$1, m as defineOptimizeDepsCompilerOptions, n as watch, o as traverse, p as defineCompilerOptions, r as generate, s as configRouteToBranchRoute, u as resolveEntryFiles } from "./typegen-
|
|
12
|
-
import { u as invariant } from "./routes-
|
|
11
|
+
import { a as t, c as createConfigLoader, d as resolveRSCEntryFiles, f as ssrExternals, g as preloadVite, h as getVite, i as parse$1, m as defineOptimizeDepsCompilerOptions, n as watch, o as traverse, p as defineCompilerOptions, r as generate, s as configRouteToBranchRoute, u as resolveEntryFiles } from "./typegen-DTHWSW2W.js";
|
|
12
|
+
import { u as invariant } from "./routes-sm_wl6yW.js";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
14
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
15
15
|
import * as path$2 from "node:path";
|
|
@@ -2988,6 +2988,11 @@ ${result}`;
|
|
|
2988
2988
|
}
|
|
2989
2989
|
};
|
|
2990
2990
|
}
|
|
2991
|
+
function createClientRouteModuleForOptimizeDepsScan(code) {
|
|
2992
|
+
const ast = parse$1(code, { sourceType: "module" });
|
|
2993
|
+
removeExports(ast, SERVER_ROUTE_EXPORTS);
|
|
2994
|
+
return generate(ast);
|
|
2995
|
+
}
|
|
2991
2996
|
function createId(id, type, value) {
|
|
2992
2997
|
let [base, ...rest] = id.split("?");
|
|
2993
2998
|
const searchParams = new URLSearchParams(rest.join("?"));
|
|
@@ -3193,6 +3198,11 @@ function reactRouterRSCVitePlugin() {
|
|
|
3193
3198
|
logger = (await import("vite")).createLogger(viteUserConfig.logLevel, { prefix: "[react-router]" });
|
|
3194
3199
|
entries = await resolveRSCEntryFiles({ reactRouterConfig: config });
|
|
3195
3200
|
let viteNormalizePath = (await import("vite")).normalizePath;
|
|
3201
|
+
let optimizeDepsEntries = getOptimizeDepsEntries({
|
|
3202
|
+
entryClientFilePath: entries.client,
|
|
3203
|
+
reactRouterConfig: config
|
|
3204
|
+
});
|
|
3205
|
+
let routeFiles = new Set(Object.values(config.routes).map((route) => resolveRelativeRouteFilePath(route, config)));
|
|
3196
3206
|
return {
|
|
3197
3207
|
resolve: { dedupe: [
|
|
3198
3208
|
"react",
|
|
@@ -3209,12 +3219,15 @@ function reactRouterRSCVitePlugin() {
|
|
|
3209
3219
|
}) ? ["react-server-dom-webpack"] : []
|
|
3210
3220
|
] },
|
|
3211
3221
|
optimizeDeps: {
|
|
3212
|
-
entries:
|
|
3213
|
-
entryClientFilePath: entries.client,
|
|
3214
|
-
reactRouterConfig: config
|
|
3215
|
-
}),
|
|
3222
|
+
entries: optimizeDepsEntries,
|
|
3216
3223
|
...defineOptimizeDepsCompilerOptions({
|
|
3217
|
-
rolldown: {
|
|
3224
|
+
rolldown: {
|
|
3225
|
+
transform: { jsx: "react-jsx" },
|
|
3226
|
+
plugins: config.future.unstable_optimizeDeps ? [createRSCOptimizeDepsRouteModulesPlugin({
|
|
3227
|
+
routeFiles,
|
|
3228
|
+
transformToJs
|
|
3229
|
+
})] : []
|
|
3230
|
+
},
|
|
3218
3231
|
esbuild: { jsx: "automatic" }
|
|
3219
3232
|
}),
|
|
3220
3233
|
include: [
|
|
@@ -3230,9 +3243,7 @@ function reactRouterRSCVitePlugin() {
|
|
|
3230
3243
|
"react-router",
|
|
3231
3244
|
"react-router/dom",
|
|
3232
3245
|
"react-router/internal/react-server-client"
|
|
3233
|
-
]
|
|
3234
|
-
"react-router > cookie",
|
|
3235
|
-
"react-router > set-cookie-parser"
|
|
3246
|
+
]
|
|
3236
3247
|
]
|
|
3237
3248
|
},
|
|
3238
3249
|
...defineCompilerOptions({
|
|
@@ -3550,6 +3561,25 @@ function invalidateVirtualModules(viteDevServer) {
|
|
|
3550
3561
|
function getRootDirectory(viteUserConfig) {
|
|
3551
3562
|
return viteUserConfig.root ?? process.env.REACT_ROUTER_ROOT ?? process.cwd();
|
|
3552
3563
|
}
|
|
3564
|
+
const jsRouteModuleRE = /\.[cm]?[jt]sx?$/;
|
|
3565
|
+
function createRSCOptimizeDepsRouteModulesPlugin({ routeFiles, transformToJs }) {
|
|
3566
|
+
return {
|
|
3567
|
+
name: "react-router:rsc-optimize-deps-route-modules",
|
|
3568
|
+
transform: {
|
|
3569
|
+
filter: { id: jsRouteModuleRE },
|
|
3570
|
+
async handler(code, id) {
|
|
3571
|
+
let filename = id.split("?")[0];
|
|
3572
|
+
let normalizedFilename = getVite().normalizePath(filename);
|
|
3573
|
+
if (!routeFiles.has(normalizedFilename)) return;
|
|
3574
|
+
return {
|
|
3575
|
+
code: createClientRouteModuleForOptimizeDepsScan(await transformToJs(code, filename)).code,
|
|
3576
|
+
map: null,
|
|
3577
|
+
moduleType: "js"
|
|
3578
|
+
};
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
};
|
|
3582
|
+
}
|
|
3553
3583
|
const getClientBuildDirectory = (reactRouterConfig) => path$1.join(reactRouterConfig.buildDirectory, "client");
|
|
3554
3584
|
function getPrerenderConcurrencyConfig(reactRouterConfig) {
|
|
3555
3585
|
let concurrency = 1;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-experimental-
|
|
4
|
+
"version": "0.0.0-experimental-8cee090e4",
|
|
5
5
|
"description": "Dev tools and CLI for React Router",
|
|
6
6
|
"homepage": "https://reactrouter.com",
|
|
7
7
|
"bugs": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"semver": "^7.8.1",
|
|
89
89
|
"tinyglobby": "^0.2.16",
|
|
90
90
|
"valibot": "^1.4.1",
|
|
91
|
-
"@react-router/node": "0.0.0-experimental-
|
|
91
|
+
"@react-router/node": "0.0.0-experimental-8cee090e4"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/babel__core": "^7.20.5",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"vite": "^7.0.0",
|
|
111
111
|
"wireit": "0.14.12",
|
|
112
112
|
"wrangler": "^4.95.0",
|
|
113
|
-
"@react-router/serve": "0.0.0-experimental-
|
|
114
|
-
"react-router": "^0.0.0-experimental-
|
|
113
|
+
"@react-router/serve": "0.0.0-experimental-8cee090e4",
|
|
114
|
+
"react-router": "^0.0.0-experimental-8cee090e4"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"@vitejs/plugin-rsc": "~0.5.26",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"typescript": "^5.1.0 || ^6.0.0",
|
|
120
120
|
"vite": "^7.0.0 || ^8.0.0",
|
|
121
121
|
"wrangler": "^4.0.0",
|
|
122
|
-
"
|
|
123
|
-
"react-router": "^0.0.0-experimental-
|
|
122
|
+
"react-router": "^0.0.0-experimental-8cee090e4",
|
|
123
|
+
"@react-router/serve": "^0.0.0-experimental-8cee090e4"
|
|
124
124
|
},
|
|
125
125
|
"peerDependenciesMeta": {
|
|
126
126
|
"@vitejs/plugin-rsc": {
|