@react-router/dev 0.0.0-experimental-51412399d → 0.0.0-experimental-abc385596
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 +24 -3
- package/dist/cli/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +2 -2
- package/dist/vite.js +14 -11
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## v7.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix `basename` conflicting with `app` directory name when Vite `base` is set ([#15027](https://github.com/remix-run/react-router/pull/15027))
|
|
8
|
+
|
|
9
|
+
When the Vite `base` config and React Router `basename` both match the
|
|
10
|
+
app directory name (e.g. `base: "/app/"`, `basename: "/app/"`), Vite would
|
|
11
|
+
strip the base prefix from server-build virtual module import paths, causing
|
|
12
|
+
"Failed to load url /root.tsx" errors. The fix uses `/@fs/` absolute paths
|
|
13
|
+
for those imports to bypass Vite's base-stripping logic.
|
|
14
|
+
- Updated dependencies:
|
|
15
|
+
- [`react-router@7.15.1`](https://github.com/remix-run/react-router/releases/tag/react-router@7.15.1)
|
|
16
|
+
- [`@react-router/node@7.15.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.15.1)
|
|
17
|
+
- [`@react-router/serve@7.15.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.15.1)
|
|
18
|
+
|
|
3
19
|
## v7.15.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
6
22
|
|
|
7
|
-
- Stabilize `future.unstable_passThroughRequests` as `future.v8_passThroughRequests` ([
|
|
8
|
-
-
|
|
9
|
-
|
|
23
|
+
- Stabilize `future.unstable_passThroughRequests` as `future.v8_passThroughRequests` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
24
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
25
|
+
|
|
26
|
+
- Stabilize `prerender.unstable_concurrency` as `prerender.concurrency` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
27
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
28
|
+
|
|
29
|
+
- Stabilize `future.unstable_subResourceIntegrity` as a top-level `subResourceIntegrity` config option in `react-router.config.ts` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
30
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
10
31
|
|
|
11
32
|
### Patch Changes
|
|
12
33
|
|
package/dist/cli/index.js
CHANGED
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
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-abc385596
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -802,7 +802,7 @@ var serverBuildId = "virtual:react-router/server-build";
|
|
|
802
802
|
function importWrangler() {
|
|
803
803
|
try {
|
|
804
804
|
return import("wrangler");
|
|
805
|
-
} catch (
|
|
805
|
+
} catch (e) {
|
|
806
806
|
throw Error("Could not import `wrangler`. Do you have it installed?");
|
|
807
807
|
}
|
|
808
808
|
}
|
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-abc385596
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1394,14 +1394,18 @@ var import_react_router = require("react-router");
|
|
|
1394
1394
|
|
|
1395
1395
|
// vite/resolve-file-url.ts
|
|
1396
1396
|
var path3 = __toESM(require("path"));
|
|
1397
|
-
var resolveFileUrl = ({ rootDirectory }, filePath) => {
|
|
1397
|
+
var resolveFileUrl = ({ rootDirectory }, filePath, { publicPath } = {}) => {
|
|
1398
1398
|
let vite2 = getVite();
|
|
1399
1399
|
let relativePath = path3.relative(rootDirectory, filePath);
|
|
1400
1400
|
let isWithinRoot = !relativePath.startsWith("..") && !path3.isAbsolute(relativePath);
|
|
1401
1401
|
if (!isWithinRoot) {
|
|
1402
1402
|
return path3.posix.join("/@fs", vite2.normalizePath(filePath));
|
|
1403
1403
|
}
|
|
1404
|
-
|
|
1404
|
+
let url2 = "/" + vite2.normalizePath(relativePath);
|
|
1405
|
+
if (publicPath && publicPath !== "/" && url2.startsWith(publicPath)) {
|
|
1406
|
+
return path3.posix.join("/@fs", vite2.normalizePath(filePath));
|
|
1407
|
+
}
|
|
1408
|
+
return url2;
|
|
1405
1409
|
};
|
|
1406
1410
|
|
|
1407
1411
|
// vite/styles.ts
|
|
@@ -1732,7 +1736,7 @@ function hasDependency({
|
|
|
1732
1736
|
}) {
|
|
1733
1737
|
try {
|
|
1734
1738
|
return Boolean(require.resolve(name, { paths: [rootDirectory] }));
|
|
1735
|
-
} catch (
|
|
1739
|
+
} catch (e) {
|
|
1736
1740
|
return false;
|
|
1737
1741
|
}
|
|
1738
1742
|
}
|
|
@@ -3152,7 +3156,9 @@ var reactRouterVitePlugin = () => {
|
|
|
3152
3156
|
let isSpaMode = isSpaModeEnabled(ctx.reactRouterConfig);
|
|
3153
3157
|
return `
|
|
3154
3158
|
import * as entryServer from ${JSON.stringify(
|
|
3155
|
-
resolveFileUrl(ctx, ctx.entryServerFilePath
|
|
3159
|
+
resolveFileUrl(ctx, ctx.entryServerFilePath, {
|
|
3160
|
+
publicPath: ctx.publicPath
|
|
3161
|
+
})
|
|
3156
3162
|
)};
|
|
3157
3163
|
${Object.keys(routes).map((key, index) => {
|
|
3158
3164
|
let route = routes[key];
|
|
@@ -3162,7 +3168,8 @@ var reactRouterVitePlugin = () => {
|
|
|
3162
3168
|
return `import * as route${index} from ${JSON.stringify(
|
|
3163
3169
|
resolveFileUrl(
|
|
3164
3170
|
ctx,
|
|
3165
|
-
resolveRelativeRouteFilePath(route, ctx.reactRouterConfig)
|
|
3171
|
+
resolveRelativeRouteFilePath(route, ctx.reactRouterConfig),
|
|
3172
|
+
{ publicPath: ctx.publicPath }
|
|
3166
3173
|
)
|
|
3167
3174
|
)};`;
|
|
3168
3175
|
}
|
|
@@ -4646,7 +4653,7 @@ ${html}`
|
|
|
4646
4653
|
},
|
|
4647
4654
|
async finalize(buildDirectory) {
|
|
4648
4655
|
invariant(viteConfig);
|
|
4649
|
-
let { ssr
|
|
4656
|
+
let { ssr } = ctx.reactRouterConfig;
|
|
4650
4657
|
if (!ssr) {
|
|
4651
4658
|
let spaFallback = path7.join(buildDirectory, "__spa-fallback.html");
|
|
4652
4659
|
let index = path7.join(buildDirectory, "index.html");
|
|
@@ -6262,10 +6269,6 @@ function reactRouterRSCVitePlugin() {
|
|
|
6262
6269
|
([routeFile]) => import_pathe6.default.normalize(routeFile).endsWith(normalizedFile)
|
|
6263
6270
|
)?.[1];
|
|
6264
6271
|
}
|
|
6265
|
-
function isMdxRouteModule(filename2) {
|
|
6266
|
-
let extension = import_pathe6.default.extname(filename2).toLowerCase();
|
|
6267
|
-
return extension === ".md" || extension === ".mdx";
|
|
6268
|
-
}
|
|
6269
6272
|
function getTransformLanguage(filename2) {
|
|
6270
6273
|
let extension = import_pathe6.default.extname(filename2).toLowerCase();
|
|
6271
6274
|
switch (extension) {
|
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-abc385596",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"tinyglobby": "^0.2.14",
|
|
93
93
|
"valibot": "^1.2.0",
|
|
94
94
|
"vite-node": "^3.2.2",
|
|
95
|
-
"@react-router/node": "0.0.0-experimental-
|
|
95
|
+
"@react-router/node": "0.0.0-experimental-abc385596"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@types/babel__core": "^7.20.5",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"vite": "^6.3.0",
|
|
117
117
|
"wireit": "0.14.9",
|
|
118
118
|
"wrangler": "^4.23.0",
|
|
119
|
-
"
|
|
120
|
-
"react-router": "
|
|
119
|
+
"react-router": "^0.0.0-experimental-abc385596",
|
|
120
|
+
"@react-router/serve": "0.0.0-experimental-abc385596"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"@vitejs/plugin-rsc": "~0.5.21",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"typescript": "^5.1.0 || ^6.0.0",
|
|
126
126
|
"vite": "^5.1.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
127
127
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
128
|
-
"@react-router/serve": "^0.0.0-experimental-
|
|
129
|
-
"react-router": "^0.0.0-experimental-
|
|
128
|
+
"@react-router/serve": "^0.0.0-experimental-abc385596",
|
|
129
|
+
"react-router": "^0.0.0-experimental-abc385596"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
132
132
|
"@vitejs/plugin-rsc": {
|