@react-router/dev 0.0.0-experimental-64e35e758 → 0.0.0-experimental-7db49e8d4
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 +0 -62
- package/dist/cli/index.js +33 -38
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.d.ts +1 -1
- package/dist/vite/cloudflare.js +9 -9
- package/dist/vite.js +33 -44
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,67 +1,5 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
-
## 7.6.2
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Avoid additional `with-props` chunk in Framework Mode by moving route module component prop logic from the Vite plugin to `react-router` ([#13650](https://github.com/remix-run/react-router/pull/13650))
|
|
8
|
-
|
|
9
|
-
- When `future.unstable_viteEnvironmentApi` is enabled and an absolute Vite `base` has been configured, ensure critical CSS is handled correctly during development ([#13598](https://github.com/remix-run/react-router/pull/13598))
|
|
10
|
-
|
|
11
|
-
- Update `vite-node` ([#13673](https://github.com/remix-run/react-router/pull/13673))
|
|
12
|
-
|
|
13
|
-
- Fix typegen for non-{.js,.jsx,.ts,.tsx} routes like .mdx ([#12453](https://github.com/remix-run/react-router/pull/12453))
|
|
14
|
-
|
|
15
|
-
- Fix href types for optional dynamic params ([#13725](https://github.com/remix-run/react-router/pull/13725))
|
|
16
|
-
|
|
17
|
-
7.6.1 introduced fixes for `href` when using optional static segments,
|
|
18
|
-
but those fixes caused regressions with how optional dynamic params worked in 7.6.0:
|
|
19
|
-
|
|
20
|
-
```ts
|
|
21
|
-
// 7.6.0
|
|
22
|
-
href("/users/:id?"); // ✅
|
|
23
|
-
href("/users/:id?", { id: 1 }); // ✅
|
|
24
|
-
|
|
25
|
-
// 7.6.1
|
|
26
|
-
href("/users/:id?"); // ❌
|
|
27
|
-
href("/users/:id?", { id: 1 }); // ❌
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Now, optional static segments are expanded into different paths for `href`, but optional dynamic params are not.
|
|
31
|
-
This way `href` can unambiguously refer to an exact URL path, all while keeping the number of path options to a minimum.
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
// 7.6.2
|
|
35
|
-
|
|
36
|
-
// path: /users/:id?/edit?
|
|
37
|
-
href("
|
|
38
|
-
// ^ suggestions when cursor is here:
|
|
39
|
-
//
|
|
40
|
-
// /users/:id?
|
|
41
|
-
// /users/:id?/edit
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Additionally, you can pass `params` from component props without needing to narrow them manually:
|
|
45
|
-
|
|
46
|
-
```ts
|
|
47
|
-
declare const params: { id?: number };
|
|
48
|
-
|
|
49
|
-
// 7.6.0
|
|
50
|
-
href("/users/:id?", params);
|
|
51
|
-
|
|
52
|
-
// 7.6.1
|
|
53
|
-
href("/users/:id?", params); // ❌
|
|
54
|
-
"id" in params ? href("/users/:id", params) : href("/users"); // works... but is annoying
|
|
55
|
-
|
|
56
|
-
// 7.6.2
|
|
57
|
-
href("/users/:id?", params); // restores behavior of 7.6.0
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
- Updated dependencies:
|
|
61
|
-
- `react-router@7.6.2`
|
|
62
|
-
- `@react-router/node@7.6.2`
|
|
63
|
-
- `@react-router/serve@7.6.2`
|
|
64
|
-
|
|
65
3
|
## 7.6.1
|
|
66
4
|
|
|
67
5
|
### 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-7db49e8d4
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -130,11 +130,6 @@ async function createContext({
|
|
|
130
130
|
}) {
|
|
131
131
|
await preloadVite();
|
|
132
132
|
const vite2 = getVite();
|
|
133
|
-
const [{ ViteNodeServer }, { ViteNodeRunner }, { installSourcemapsSupport }] = await Promise.all([
|
|
134
|
-
import("vite-node/server"),
|
|
135
|
-
import("vite-node/client"),
|
|
136
|
-
import("vite-node/source-map")
|
|
137
|
-
]);
|
|
138
133
|
const devServer = await vite2.createServer({
|
|
139
134
|
root,
|
|
140
135
|
mode,
|
|
@@ -164,11 +159,11 @@ async function createContext({
|
|
|
164
159
|
plugins: []
|
|
165
160
|
});
|
|
166
161
|
await devServer.pluginContainer.buildStart({});
|
|
167
|
-
const server = new ViteNodeServer(devServer);
|
|
168
|
-
installSourcemapsSupport({
|
|
162
|
+
const server = new import_server.ViteNodeServer(devServer);
|
|
163
|
+
(0, import_source_map.installSourcemapsSupport)({
|
|
169
164
|
getSourceMap: (source) => server.getSourceMap(source)
|
|
170
165
|
});
|
|
171
|
-
const runner = new ViteNodeRunner({
|
|
166
|
+
const runner = new import_client.ViteNodeRunner({
|
|
172
167
|
root: devServer.config.root,
|
|
173
168
|
base: devServer.config.base,
|
|
174
169
|
fetchModule(id) {
|
|
@@ -180,9 +175,13 @@ async function createContext({
|
|
|
180
175
|
});
|
|
181
176
|
return { devServer, server, runner };
|
|
182
177
|
}
|
|
178
|
+
var import_server, import_client, import_source_map;
|
|
183
179
|
var init_vite_node = __esm({
|
|
184
180
|
"vite/vite-node.ts"() {
|
|
185
181
|
"use strict";
|
|
182
|
+
import_server = require("vite-node/server");
|
|
183
|
+
import_client = require("vite-node/client");
|
|
184
|
+
import_source_map = require("vite-node/source-map");
|
|
186
185
|
init_vite();
|
|
187
186
|
init_ssr_externals();
|
|
188
187
|
}
|
|
@@ -929,7 +928,7 @@ function generateRoutes(ctx) {
|
|
|
929
928
|
lineages.set(route.id, lineage2);
|
|
930
929
|
const fullpath2 = fullpath(lineage2);
|
|
931
930
|
if (!fullpath2) continue;
|
|
932
|
-
const pages =
|
|
931
|
+
const pages = explodeOptionalSegments(fullpath2);
|
|
933
932
|
pages.forEach((page) => allPages.add(page));
|
|
934
933
|
lineage2.forEach(({ id }) => {
|
|
935
934
|
let routePages = routeToPages.get(id);
|
|
@@ -1137,13 +1136,9 @@ function getRouteAnnotations({
|
|
|
1137
1136
|
}
|
|
1138
1137
|
function relativeImportSource(from, to) {
|
|
1139
1138
|
let path8 = Path3.relative(Path3.dirname(from), to);
|
|
1140
|
-
let extension = Path3.extname(path8);
|
|
1141
1139
|
path8 = Path3.join(Path3.dirname(path8), Pathe.filename(path8));
|
|
1142
1140
|
if (!path8.startsWith("../")) path8 = "./" + path8;
|
|
1143
|
-
|
|
1144
|
-
extension = ".js";
|
|
1145
|
-
}
|
|
1146
|
-
return path8 + extension;
|
|
1141
|
+
return path8 + ".js";
|
|
1147
1142
|
}
|
|
1148
1143
|
function rootDirsPath(ctx, typesPath) {
|
|
1149
1144
|
const rel = Path3.relative(typesDirectory(ctx), typesPath);
|
|
@@ -1162,27 +1157,28 @@ function paramsType(path8) {
|
|
|
1162
1157
|
})
|
|
1163
1158
|
);
|
|
1164
1159
|
}
|
|
1165
|
-
function
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1160
|
+
function explodeOptionalSegments(path8) {
|
|
1161
|
+
let segments = path8.split("/");
|
|
1162
|
+
if (segments.length === 0) return [];
|
|
1163
|
+
let [first, ...rest] = segments;
|
|
1164
|
+
let isOptional = first.endsWith("?");
|
|
1165
|
+
let required = first.replace(/\?$/, "");
|
|
1166
|
+
if (rest.length === 0) {
|
|
1167
|
+
return isOptional ? [required, ""] : [required];
|
|
1168
|
+
}
|
|
1169
|
+
let restExploded = explodeOptionalSegments(rest.join("/"));
|
|
1170
|
+
let result = [];
|
|
1171
|
+
result.push(
|
|
1172
|
+
...restExploded.map(
|
|
1173
|
+
(subpath) => subpath === "" ? required : [required, subpath].join("/")
|
|
1174
|
+
)
|
|
1175
|
+
);
|
|
1176
|
+
if (isOptional) {
|
|
1177
|
+
result.push(...restExploded);
|
|
1178
|
+
}
|
|
1179
|
+
return result.map(
|
|
1180
|
+
(exploded) => path8.startsWith("/") && exploded === "" ? "/" : exploded
|
|
1181
|
+
);
|
|
1186
1182
|
}
|
|
1187
1183
|
var import_dedent, Path3, Pathe, t2;
|
|
1188
1184
|
var init_generate = __esm({
|
|
@@ -1635,7 +1631,7 @@ function resolveEnvironmentsOptions(environmentResolvers, resolverOptions) {
|
|
|
1635
1631
|
function isNonNullable(x) {
|
|
1636
1632
|
return x != null;
|
|
1637
1633
|
}
|
|
1638
|
-
var import_node_crypto, fs4, path6, url, fse, babel2, import_react_router2, import_es_module_lexer,
|
|
1634
|
+
var import_node_crypto, fs4, path6, url, fse, babel2, import_react_router2, import_es_module_lexer, import_pick3, import_jsesc, import_picocolors4, import_kebabCase, CLIENT_NON_COMPONENT_EXPORTS, CLIENT_ROUTE_EXPORTS, BUILD_CLIENT_ROUTE_QUERY_STRING, SSR_BUNDLE_PREFIX, virtualHmrRuntime, virtualInjectHmrRuntime, virtual, getServerBuildDirectory, getClientBuildDirectory, defaultEntriesDir, defaultEntries, REACT_REFRESH_HEADER;
|
|
1639
1635
|
var init_plugin = __esm({
|
|
1640
1636
|
"vite/plugin.ts"() {
|
|
1641
1637
|
"use strict";
|
|
@@ -1647,7 +1643,6 @@ var init_plugin = __esm({
|
|
|
1647
1643
|
babel2 = __toESM(require("@babel/core"));
|
|
1648
1644
|
import_react_router2 = require("react-router");
|
|
1649
1645
|
import_es_module_lexer = require("es-module-lexer");
|
|
1650
|
-
import_tinyglobby = require("tinyglobby");
|
|
1651
1646
|
import_pick3 = __toESM(require("lodash/pick"));
|
|
1652
1647
|
import_jsesc = __toESM(require("jsesc"));
|
|
1653
1648
|
import_picocolors4 = __toESM(require("picocolors"));
|
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext } from 'react-router';
|
|
2
2
|
import { Plugin } from 'vite';
|
|
3
|
-
import {
|
|
3
|
+
import { PlatformProxy, GetPlatformProxyOptions } from 'wrangler';
|
|
4
4
|
|
|
5
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
6
6
|
type CfProperties = Record<string, unknown>;
|
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-7db49e8d4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -174,6 +174,11 @@ var import_node_fs = __toESM(require("fs"));
|
|
|
174
174
|
var import_node_child_process = require("child_process");
|
|
175
175
|
var import_package_json = __toESM(require("@npmcli/package-json"));
|
|
176
176
|
|
|
177
|
+
// vite/vite-node.ts
|
|
178
|
+
var import_server = require("vite-node/server");
|
|
179
|
+
var import_client = require("vite-node/client");
|
|
180
|
+
var import_source_map = require("vite-node/source-map");
|
|
181
|
+
|
|
177
182
|
// vite/ssr-externals.ts
|
|
178
183
|
var ssrExternals = isReactRouterRepo() ? [
|
|
179
184
|
// This is only needed within this repo because these packages
|
|
@@ -197,11 +202,6 @@ async function createContext({
|
|
|
197
202
|
}) {
|
|
198
203
|
await preloadVite();
|
|
199
204
|
const vite2 = getVite();
|
|
200
|
-
const [{ ViteNodeServer }, { ViteNodeRunner }, { installSourcemapsSupport }] = await Promise.all([
|
|
201
|
-
import("vite-node/server"),
|
|
202
|
-
import("vite-node/client"),
|
|
203
|
-
import("vite-node/source-map")
|
|
204
|
-
]);
|
|
205
205
|
const devServer = await vite2.createServer({
|
|
206
206
|
root,
|
|
207
207
|
mode,
|
|
@@ -231,11 +231,11 @@ async function createContext({
|
|
|
231
231
|
plugins: []
|
|
232
232
|
});
|
|
233
233
|
await devServer.pluginContainer.buildStart({});
|
|
234
|
-
const server = new ViteNodeServer(devServer);
|
|
235
|
-
installSourcemapsSupport({
|
|
234
|
+
const server = new import_server.ViteNodeServer(devServer);
|
|
235
|
+
(0, import_source_map.installSourcemapsSupport)({
|
|
236
236
|
getSourceMap: (source) => server.getSourceMap(source)
|
|
237
237
|
});
|
|
238
|
-
const runner = new ViteNodeRunner({
|
|
238
|
+
const runner = new import_client.ViteNodeRunner({
|
|
239
239
|
root: devServer.config.root,
|
|
240
240
|
base: devServer.config.base,
|
|
241
241
|
fetchModule(id) {
|
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-7db49e8d4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -53,7 +53,6 @@ var fse = __toESM(require("fs-extra"));
|
|
|
53
53
|
var babel = __toESM(require("@babel/core"));
|
|
54
54
|
var import_react_router2 = require("react-router");
|
|
55
55
|
var import_es_module_lexer = require("es-module-lexer");
|
|
56
|
-
var import_tinyglobby = require("tinyglobby");
|
|
57
56
|
var import_pick3 = __toESM(require("lodash/pick"));
|
|
58
57
|
var import_jsesc = __toESM(require("jsesc"));
|
|
59
58
|
var import_picocolors3 = __toESM(require("picocolors"));
|
|
@@ -69,6 +68,11 @@ var import_node_fs = __toESM(require("fs"));
|
|
|
69
68
|
var import_node_child_process = require("child_process");
|
|
70
69
|
var import_package_json = __toESM(require("@npmcli/package-json"));
|
|
71
70
|
|
|
71
|
+
// vite/vite-node.ts
|
|
72
|
+
var import_server = require("vite-node/server");
|
|
73
|
+
var import_client = require("vite-node/client");
|
|
74
|
+
var import_source_map = require("vite-node/source-map");
|
|
75
|
+
|
|
72
76
|
// vite/vite.ts
|
|
73
77
|
var import_pathe2 = __toESM(require("pathe"));
|
|
74
78
|
|
|
@@ -136,11 +140,6 @@ async function createContext({
|
|
|
136
140
|
}) {
|
|
137
141
|
await preloadVite();
|
|
138
142
|
const vite2 = getVite();
|
|
139
|
-
const [{ ViteNodeServer }, { ViteNodeRunner }, { installSourcemapsSupport }] = await Promise.all([
|
|
140
|
-
import("vite-node/server"),
|
|
141
|
-
import("vite-node/client"),
|
|
142
|
-
import("vite-node/source-map")
|
|
143
|
-
]);
|
|
144
143
|
const devServer = await vite2.createServer({
|
|
145
144
|
root,
|
|
146
145
|
mode,
|
|
@@ -170,11 +169,11 @@ async function createContext({
|
|
|
170
169
|
plugins: []
|
|
171
170
|
});
|
|
172
171
|
await devServer.pluginContainer.buildStart({});
|
|
173
|
-
const server = new ViteNodeServer(devServer);
|
|
174
|
-
installSourcemapsSupport({
|
|
172
|
+
const server = new import_server.ViteNodeServer(devServer);
|
|
173
|
+
(0, import_source_map.installSourcemapsSupport)({
|
|
175
174
|
getSourceMap: (source) => server.getSourceMap(source)
|
|
176
175
|
});
|
|
177
|
-
const runner = new ViteNodeRunner({
|
|
176
|
+
const runner = new import_client.ViteNodeRunner({
|
|
178
177
|
root: devServer.config.root,
|
|
179
178
|
base: devServer.config.base,
|
|
180
179
|
fetchModule(id) {
|
|
@@ -916,7 +915,7 @@ function generateRoutes(ctx) {
|
|
|
916
915
|
lineages.set(route.id, lineage2);
|
|
917
916
|
const fullpath2 = fullpath(lineage2);
|
|
918
917
|
if (!fullpath2) continue;
|
|
919
|
-
const pages =
|
|
918
|
+
const pages = explodeOptionalSegments(fullpath2);
|
|
920
919
|
pages.forEach((page) => allPages.add(page));
|
|
921
920
|
lineage2.forEach(({ id }) => {
|
|
922
921
|
let routePages = routeToPages.get(id);
|
|
@@ -1124,13 +1123,9 @@ function getRouteAnnotations({
|
|
|
1124
1123
|
}
|
|
1125
1124
|
function relativeImportSource(from, to) {
|
|
1126
1125
|
let path6 = Path3.relative(Path3.dirname(from), to);
|
|
1127
|
-
let extension = Path3.extname(path6);
|
|
1128
1126
|
path6 = Path3.join(Path3.dirname(path6), Pathe.filename(path6));
|
|
1129
1127
|
if (!path6.startsWith("../")) path6 = "./" + path6;
|
|
1130
|
-
|
|
1131
|
-
extension = ".js";
|
|
1132
|
-
}
|
|
1133
|
-
return path6 + extension;
|
|
1128
|
+
return path6 + ".js";
|
|
1134
1129
|
}
|
|
1135
1130
|
function rootDirsPath(ctx, typesPath) {
|
|
1136
1131
|
const rel = Path3.relative(typesDirectory(ctx), typesPath);
|
|
@@ -1149,27 +1144,28 @@ function paramsType(path6) {
|
|
|
1149
1144
|
})
|
|
1150
1145
|
);
|
|
1151
1146
|
}
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
const kept = isDynamic ? segment : required;
|
|
1161
|
-
const withoutSegment = recurse(segments2, index + 1);
|
|
1162
|
-
const withSegment = withoutSegment.map((rest) => [kept, rest].join("/"));
|
|
1163
|
-
if (keep) return withSegment;
|
|
1164
|
-
return [...withoutSegment, ...withSegment];
|
|
1147
|
+
function explodeOptionalSegments(path6) {
|
|
1148
|
+
let segments = path6.split("/");
|
|
1149
|
+
if (segments.length === 0) return [];
|
|
1150
|
+
let [first, ...rest] = segments;
|
|
1151
|
+
let isOptional = first.endsWith("?");
|
|
1152
|
+
let required = first.replace(/\?$/, "");
|
|
1153
|
+
if (rest.length === 0) {
|
|
1154
|
+
return isOptional ? [required, ""] : [required];
|
|
1165
1155
|
}
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1156
|
+
let restExploded = explodeOptionalSegments(rest.join("/"));
|
|
1157
|
+
let result = [];
|
|
1158
|
+
result.push(
|
|
1159
|
+
...restExploded.map(
|
|
1160
|
+
(subpath) => subpath === "" ? required : [required, subpath].join("/")
|
|
1161
|
+
)
|
|
1162
|
+
);
|
|
1163
|
+
if (isOptional) {
|
|
1164
|
+
result.push(...restExploded);
|
|
1171
1165
|
}
|
|
1172
|
-
return
|
|
1166
|
+
return result.map(
|
|
1167
|
+
(exploded) => path6.startsWith("/") && exploded === "" ? "/" : exploded
|
|
1168
|
+
);
|
|
1173
1169
|
}
|
|
1174
1170
|
|
|
1175
1171
|
// typegen/index.ts
|
|
@@ -2970,7 +2966,6 @@ var reactRouterVitePlugin = () => {
|
|
|
2970
2966
|
config: async (_viteUserConfig, _viteConfigEnv) => {
|
|
2971
2967
|
await preloadVite();
|
|
2972
2968
|
let vite2 = getVite();
|
|
2973
|
-
let viteMajorVersion = parseInt(vite2.version.split(".")[0], 10);
|
|
2974
2969
|
viteUserConfig = _viteUserConfig;
|
|
2975
2970
|
viteConfigEnv = _viteConfigEnv;
|
|
2976
2971
|
viteCommand = viteConfigEnv.command;
|
|
@@ -3029,13 +3024,7 @@ var reactRouterVitePlugin = () => {
|
|
|
3029
3024
|
...Object.values(ctx.reactRouterConfig.routes).map(
|
|
3030
3025
|
(route) => resolveRelativeRouteFilePath(route, ctx.reactRouterConfig)
|
|
3031
3026
|
)
|
|
3032
|
-
]
|
|
3033
|
-
(entry) => (
|
|
3034
|
-
// In Vite 7, the `optimizeDeps.entries` option only accepts glob patterns.
|
|
3035
|
-
// In prior versions, absolute file paths were treated differently.
|
|
3036
|
-
viteMajorVersion >= 7 ? (0, import_tinyglobby.escapePath)(entry) : entry
|
|
3037
|
-
)
|
|
3038
|
-
) : [],
|
|
3027
|
+
] : [],
|
|
3039
3028
|
include: [
|
|
3040
3029
|
// Pre-bundle React dependencies to avoid React duplicates,
|
|
3041
3030
|
// even if React dependencies are not direct dependencies.
|
|
@@ -3282,7 +3271,7 @@ var reactRouterVitePlugin = () => {
|
|
|
3282
3271
|
if (ctx.reactRouterConfig.future.unstable_viteEnvironmentApi) {
|
|
3283
3272
|
viteDevServer.middlewares.use(async (req, res, next) => {
|
|
3284
3273
|
let [reqPathname, reqSearch] = (req.url ?? "").split("?");
|
|
3285
|
-
if (reqPathname.
|
|
3274
|
+
if (reqPathname === `${ctx.publicPath}@react-router/critical.css`) {
|
|
3286
3275
|
let pathname = new URLSearchParams(reqSearch).get("pathname");
|
|
3287
3276
|
if (!pathname) {
|
|
3288
3277
|
return next("No pathname provided");
|
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-7db49e8d4",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -84,10 +84,9 @@
|
|
|
84
84
|
"react-refresh": "^0.14.0",
|
|
85
85
|
"semver": "^7.3.7",
|
|
86
86
|
"set-cookie-parser": "^2.6.0",
|
|
87
|
-
"tinyglobby": "^0.2.14",
|
|
88
87
|
"valibot": "^0.41.0",
|
|
89
88
|
"vite-node": "^3.1.4",
|
|
90
|
-
"@react-router/node": "0.0.0-experimental-
|
|
89
|
+
"@react-router/node": "0.0.0-experimental-7db49e8d4"
|
|
91
90
|
},
|
|
92
91
|
"devDependencies": {
|
|
93
92
|
"@types/babel__core": "^7.20.5",
|
|
@@ -111,15 +110,15 @@
|
|
|
111
110
|
"vite": "^6.1.0",
|
|
112
111
|
"wireit": "0.14.9",
|
|
113
112
|
"wrangler": "^4.2.0",
|
|
114
|
-
"react-router": "
|
|
115
|
-
"
|
|
113
|
+
"@react-router/serve": "0.0.0-experimental-7db49e8d4",
|
|
114
|
+
"react-router": "^0.0.0-experimental-7db49e8d4"
|
|
116
115
|
},
|
|
117
116
|
"peerDependencies": {
|
|
118
117
|
"typescript": "^5.1.0",
|
|
119
|
-
"vite": "^5.1.0 || ^6.0.0
|
|
118
|
+
"vite": "^5.1.0 || ^6.0.0",
|
|
120
119
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
121
|
-
"@react-router/serve": "^0.0.0-experimental-
|
|
122
|
-
"react-router": "^0.0.0-experimental-
|
|
120
|
+
"@react-router/serve": "^0.0.0-experimental-7db49e8d4",
|
|
121
|
+
"react-router": "^0.0.0-experimental-7db49e8d4"
|
|
123
122
|
},
|
|
124
123
|
"peerDependenciesMeta": {
|
|
125
124
|
"@react-router/serve": {
|