@react-router/dev 0.0.0-experimental-d07149147 → 0.0.0-experimental-479e73b7b
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 +173 -0
- package/bin.cjs +27 -0
- package/development-condition-enabled/false.d.mts +2 -0
- package/development-condition-enabled/false.mjs +2 -0
- package/development-condition-enabled/true.d.mts +2 -0
- package/development-condition-enabled/true.mjs +2 -0
- package/dist/build-BZ8ZGxs4.js +41 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +462 -2651
- package/dist/config/default-rsc-entries/entry.rsc.tsx +3 -0
- package/dist/config/default-rsc-entries/entry.ssr.tsx +4 -0
- package/dist/config/defaults/entry.server.node.tsx +2 -4
- package/dist/config/defaults/entry.server.web.tsx +54 -0
- package/dist/config-t89niiFv.d.ts +280 -0
- package/dist/config.d.ts +2 -280
- package/dist/config.js +2 -19
- package/dist/dev-6WvjrRMD.js +53 -0
- package/dist/routes-D18xtDiC.js +194 -0
- package/dist/{routes-CZR-bKRt.d.ts → routes-Kx8VZRs3.d.ts} +63 -62
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +3 -190
- package/dist/typegen-DSDdbRfE.js +885 -0
- package/dist/vite.d.ts +7 -6
- package/dist/vite.js +3305 -6609
- package/module-sync-enabled/index.mjs +2 -2
- package/package.json +78 -61
- package/rsc-types.d.ts +10 -0
- package/bin.js +0 -15
- package/dist/vite/cloudflare.d.ts +0 -24
- package/dist/vite/cloudflare.js +0 -949
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,178 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## v8.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Restart `react-router dev` with `--conditions=development` when not already configured ([#15291](https://github.com/remix-run/react-router/pull/15291))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Allow `typescript@7` to be used ([#15317](https://github.com/remix-run/react-router/pull/15317))
|
|
12
|
+
|
|
13
|
+
### Unstable Changes
|
|
14
|
+
|
|
15
|
+
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
|
|
16
|
+
|
|
17
|
+
- Add `unstable_rsc/client-version` client build version virtual module ([#15318](https://github.com/remix-run/react-router/pull/15318))
|
|
18
|
+
|
|
19
|
+
- Support the `subResourceIntegrity` config option in RSC Framework Mode ([#15321](https://github.com/remix-run/react-router/pull/15321))
|
|
20
|
+
|
|
21
|
+
#### Migration guide
|
|
22
|
+
|
|
23
|
+
No changes are required when using the default RSC SSR entry. If you maintain a custom `app/entry.ssr.tsx`, import the new virtual module and pass its hashes to React's `importMap` render option:
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
+import subResourceIntegrity from "virtual:react-router/unstable_rsc/subresource-integrity";
|
|
27
|
+
|
|
28
|
+
return renderToReadableStream(<RSCStaticRouter getPayload={getPayload} />, {
|
|
29
|
+
...options,
|
|
30
|
+
bootstrapScriptContent,
|
|
31
|
+
formState,
|
|
32
|
+
+ importMap: subResourceIntegrity
|
|
33
|
+
+ ? { integrity: subResourceIntegrity }
|
|
34
|
+
+ : undefined,
|
|
35
|
+
signal: request.signal,
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Updated dependencies:
|
|
40
|
+
- [`react-router@8.3.0`](https://github.com/remix-run/react-router/releases/tag/react-router@8.3.0)
|
|
41
|
+
- [`@react-router/node@8.3.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@8.3.0)
|
|
42
|
+
- [`@react-router/serve@8.3.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@8.3.0)
|
|
43
|
+
|
|
44
|
+
## v8.2.0
|
|
45
|
+
|
|
46
|
+
### Minor Changes
|
|
47
|
+
|
|
48
|
+
- Add a Web Streams default server entry for non-Node Framework mode apps ([#15290](https://github.com/remix-run/react-router/pull/15290))
|
|
49
|
+
- Apps using `@react-router/node`, `@react-router/express`, or `@react-router/serve` continue to use the `renderToPipeableStream` default server entry
|
|
50
|
+
- Apps without those Node server adapter dependencies use a `renderToReadableStream` default server entry
|
|
51
|
+
- Non-Node apps with their own `entry.server.tsx` may be able to remove it in favor of the default if it is not doing anything custom
|
|
52
|
+
- Detect `nub` as a supported package manager when installing framework dependencies ([#15276](https://github.com/remix-run/react-router/pull/15276))
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Detect user `rolldownOptions` config in Vite 8+ ([#15278](https://github.com/remix-run/react-router/pull/15278))
|
|
57
|
+
|
|
58
|
+
### Unstable Changes
|
|
59
|
+
|
|
60
|
+
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
|
|
61
|
+
|
|
62
|
+
- Add the [`future.unstable_enableNodeReadableStream`](https://reactrouter.com/upgrading/future#futureunstable_enablenodereadablestream) flag to opt Node Framework mode apps into using `renderToReadableStream` instead of `renderToPipeableStream` ([#15290](https://github.com/remix-run/react-router/pull/15290))
|
|
63
|
+
- This flag has no effect if you have your own `entry.server.tsx`
|
|
64
|
+
- Updated dependencies:
|
|
65
|
+
- [`react-router@8.2.0`](https://github.com/remix-run/react-router/releases/tag/react-router@8.2.0)
|
|
66
|
+
- [`@react-router/node@8.2.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@8.2.0)
|
|
67
|
+
- [`@react-router/serve@8.2.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@8.2.0)
|
|
68
|
+
|
|
69
|
+
## v8.1.0
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Fix a regression with the new prerendering plugin where the `react-router.config.ts` `buildEnd` hook would run before prerendering was completed ([#15211](https://github.com/remix-run/react-router/pull/15211))
|
|
74
|
+
- Fixed `react-router typegen` crashes under the Bun runtime when Babel default imports are already unwrapped ([#15214](https://github.com/remix-run/react-router/pull/15214))
|
|
75
|
+
- Replace the deprecated `envFile:false` Vite config with `envDir:false` to eliminate a deprecation warning when using vite@8.1.0+ ([#15230](https://github.com/remix-run/react-router/pull/15230))
|
|
76
|
+
- Only add the `"node"` Vite server condition for Framework mode apps that declare a Node server adapter dependency ([#15242](https://github.com/remix-run/react-router/pull/15242))
|
|
77
|
+
- This prevents non-Node SSR runtimes from resolving Node-specific package exports by default
|
|
78
|
+
- Updated dependencies:
|
|
79
|
+
- [`react-router@8.1.0`](https://github.com/remix-run/react-router/releases/tag/react-router@8.1.0)
|
|
80
|
+
- [`@react-router/node@8.1.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@8.1.0)
|
|
81
|
+
- [`@react-router/serve@8.1.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@8.1.0)
|
|
82
|
+
|
|
83
|
+
## v8.0.1
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- Updated dependencies:
|
|
88
|
+
- [`react-router@8.0.1`](https://github.com/remix-run/react-router/releases/tag/react-router@8.0.1)
|
|
89
|
+
- [`@react-router/node@8.0.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@8.0.1)
|
|
90
|
+
- [`@react-router/serve@8.0.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@8.0.1)
|
|
91
|
+
|
|
92
|
+
## v8.0.0
|
|
93
|
+
|
|
94
|
+
### Major Changes
|
|
95
|
+
|
|
96
|
+
- Remove `@react-router/dev/vite/cloudflare` dev proxy export; use `@cloudflare/vite-plugin` instead ([#15077](https://github.com/remix-run/react-router/pull/15077))
|
|
97
|
+
- Drops support for `wrangler@3` as a peer dependency of `@react-router/dev`
|
|
98
|
+
- Remove the `future.v8_trailingSlashAwareDataRequests` flag ([#15100](https://github.com/remix-run/react-router/pull/15100))
|
|
99
|
+
- Trailing slash-aware data request URLs are now the default behavior.
|
|
100
|
+
- Remove `future.v8_passThroughRequests` flag - the raw incoming `request` is now always passed through to `loader`/`action`. ([#15079](https://github.com/remix-run/react-router/pull/15079))
|
|
101
|
+
- Move `future.v8_splitRouteModules` to a top-level `splitRouteModules` config option and change the default behavior to `true` ([#15086](https://github.com/remix-run/react-router/pull/15086))
|
|
102
|
+
- Set `splitRouteModules: false` to keep route modules in a single chunk
|
|
103
|
+
- Set `splitRouteModules: "enforce"` to require all routes to be splittable
|
|
104
|
+
- Update minimum Node version to 22.22.0 ([#14928](https://github.com/remix-run/react-router/pull/14928))
|
|
105
|
+
- Require Vite 7+ and make the Vite Environment API build path mandatory ([#15077](https://github.com/remix-run/react-router/pull/15077))
|
|
106
|
+
- Removed the `future.v8_viteEnvironmentApi` flag because the Vite Environment API is always enabled ([#15077](https://github.com/remix-run/react-router/pull/15077))
|
|
107
|
+
- Removed the `future.unstable_previewServerPrerendering` flag and make prerendering with the Vite Environment API the default. ([#15077](https://github.com/remix-run/react-router/pull/15077))
|
|
108
|
+
|
|
109
|
+
### Minor Changes
|
|
110
|
+
|
|
111
|
+
- Bump dependencies ([#15080](https://github.com/remix-run/react-router/pull/15080))
|
|
112
|
+
- Bumped `@babel/core` from `^7.27.7` to `^7.29.7`
|
|
113
|
+
- Bumped `@babel/generator` from `^7.27.5` to `^7.29.7`
|
|
114
|
+
- Bumped `@babel/parser` from `^7.27.7` to `^7.29.7`
|
|
115
|
+
- Bumped `@babel/plugin-syntax-jsx` from `^7.27.1` to `^7.29.7`
|
|
116
|
+
- Bumped `@babel/preset-typescript` from `^7.27.1` to `^7.29.7`
|
|
117
|
+
- Bumped `@babel/traverse` from `^7.27.7` to `^7.29.7`
|
|
118
|
+
- Bumped `@babel/types` from `^7.27.7` to `^7.29.7`
|
|
119
|
+
- Bumped `dedent` from `^1.5.3` to `^1.7.2`
|
|
120
|
+
- Bumped `jsesc` from `3.0.2` to `3.1.0`
|
|
121
|
+
- Bumped `lodash` from `^4.17.21` to `^4.18.1`
|
|
122
|
+
- Bumped `prettier` from `^3.6.2` to `^3.8.3`
|
|
123
|
+
- Bumped `@remix-run/node-fetch-server` from `^0.13.0` to `^0.13.3`
|
|
124
|
+
- Bumped `react-refresh` from `^0.14.0` to `^0.18.0`
|
|
125
|
+
- Bumped `semver` from `^7.3.7` to `^7.8.1`
|
|
126
|
+
- Bumped `tinyglobby` from `^0.2.14` to `^0.2.16`
|
|
127
|
+
- Bumped `valibot` from `^1.2.0` to `^1.4.1`
|
|
128
|
+
- Replace `cookie` and `set-cookie-parser` with `cookie-es` ([#15109](https://github.com/remix-run/react-router/pull/15109))
|
|
129
|
+
- Removed the `vite-node` dependency in favor of Vite's native module runner APIs ([#15104](https://github.com/remix-run/react-router/pull/15104))
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- Bump dependencies ([#15080](https://github.com/remix-run/react-router/pull/15080))
|
|
134
|
+
- Bumped `@babel/core` from `^7.29.0` to `^7.29.7`
|
|
135
|
+
- Bumped `@babel/generator` from `^7.29.1` to `^7.29.7`
|
|
136
|
+
- Bumped `@babel/parser` from `^7.29.3` to `^7.29.7`
|
|
137
|
+
- Bumped `@babel/plugin-syntax-jsx` from `^7.28.6` to `^7.29.7`
|
|
138
|
+
- Bumped `@babel/preset-typescript` from `^7.28.5` to `^7.29.7`
|
|
139
|
+
- Bumped `@babel/traverse` from `^7.29.0` to `^7.29.7`
|
|
140
|
+
- Bumped `@babel/types` from `^7.29.0` to `^7.29.7`
|
|
141
|
+
- Bumped `babel-dead-code-elimination` from `^1.0.6` to `^1.0.12`
|
|
142
|
+
- Bumped `chokidar` from `^4.0.0` to `^5.0.0`
|
|
143
|
+
- Bumped `es-module-lexer` from `^1.3.1` to `^2.1.0`
|
|
144
|
+
- Bumped `exit-hook` from `2.2.1` to `5.1.0`
|
|
145
|
+
- Bumped `isbot` from `^5.1.11` to `^5.1.40`
|
|
146
|
+
- Bumped `p-map` from `^7.0.3` to `^7.0.4`
|
|
147
|
+
- Bumped `pathe` from `^1.1.2` to `^2.0.3`
|
|
148
|
+
- Bumped `pkg-types` from `^2.3.0` to `^2.3.1`
|
|
149
|
+
- Bumped `react-refresh` from `^0.14.0` to `^0.18.0`
|
|
150
|
+
- Bumped `semver` from `^7.8.0` to `^7.8.1`
|
|
151
|
+
- Bumped `tinyglobby` from `^0.2.14` to `^0.2.16`
|
|
152
|
+
- Bumped `valibot` from `^1.4.0` to `^1.4.1`
|
|
153
|
+
- Fix Windows libuv assertion (`!(handle->flags & UV_HANDLE_CLOSING)` in `src/win/async.c`) during prerendering by using `node:http` instead of `fetch` for internal prerender requests against the Vite preview server ([#15077](https://github.com/remix-run/react-router/pull/15077))
|
|
154
|
+
- Updated dependencies:
|
|
155
|
+
- [`react-router@8.0.0`](https://github.com/remix-run/react-router/releases/tag/react-router@8.0.0)
|
|
156
|
+
- [`@react-router/node@8.0.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@8.0.0)
|
|
157
|
+
- [`@react-router/serve@8.0.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@8.0.0)
|
|
158
|
+
|
|
159
|
+
## v7.18.0
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- Pass Vite `server.watch` config to child compiler in development mode. ([#15178](https://github.com/remix-run/react-router/pull/15178))
|
|
164
|
+
|
|
165
|
+
- Ignore external Vite server environments in Framework Mode build hooks ([#14883](https://github.com/remix-run/react-router/pull/14883))
|
|
166
|
+
|
|
167
|
+
When `future.v8_viteEnvironmentApi` is enabled, React Router previously treated any non-client Vite environment as its own server build. This caused issues with integrations like Nitro, where plugins can register additional environments.
|
|
168
|
+
|
|
169
|
+
Framework Mode build hooks now ignore external server environments and only process the app's own server build.
|
|
170
|
+
|
|
171
|
+
- Updated dependencies:
|
|
172
|
+
- [`react-router@7.18.0`](https://github.com/remix-run/react-router/releases/tag/react-router@7.18.0)
|
|
173
|
+
- [`@react-router/node@7.18.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.18.0)
|
|
174
|
+
- [`@react-router/serve@7.18.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.18.0)
|
|
175
|
+
|
|
3
176
|
## v7.17.0
|
|
4
177
|
|
|
5
178
|
### Patch Changes
|
package/bin.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
let { parseArgs } = require("node:util");
|
|
3
|
+
|
|
4
|
+
const commands = new Set(["build", "dev", "reveal", "routes", "typegen"]);
|
|
5
|
+
|
|
6
|
+
void (async () => {
|
|
7
|
+
// Minimal replication of our actual parsing in `run.ts`. If not already set,
|
|
8
|
+
// default `NODE_ENV` so React loads the proper version in its CJS entry script.
|
|
9
|
+
// We have to do this before importing `run.ts` since that is what imports
|
|
10
|
+
// `react` (indirectly via `react-router`)
|
|
11
|
+
let { positionals } = parseArgs({
|
|
12
|
+
args: process.argv.slice(2),
|
|
13
|
+
allowPositionals: true,
|
|
14
|
+
strict: false,
|
|
15
|
+
});
|
|
16
|
+
let command = positionals.find((positional) => commands.has(positional));
|
|
17
|
+
if (!command || command === "dev") {
|
|
18
|
+
process.env.NODE_ENV = process.env.NODE_ENV ?? "development";
|
|
19
|
+
} else {
|
|
20
|
+
process.env.NODE_ENV = process.env.NODE_ENV ?? "production";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
await import("./dist/cli/index.js");
|
|
24
|
+
})().catch((error) => {
|
|
25
|
+
if (error) console.error(error);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-479e73b7b
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
import { _ as getVite, v as preloadVite } from "./typegen-DSDdbRfE.js";
|
|
12
|
+
//#region vite/build.ts
|
|
13
|
+
async function build(root, viteBuildOptions) {
|
|
14
|
+
await preloadVite();
|
|
15
|
+
let { assetsInlineLimit, clearScreen, config: configFile, emptyOutDir, force, logLevel, minify, mode, sourcemapClient, sourcemapServer } = viteBuildOptions;
|
|
16
|
+
await (await getVite().createBuilder({
|
|
17
|
+
root,
|
|
18
|
+
mode,
|
|
19
|
+
configFile,
|
|
20
|
+
build: {
|
|
21
|
+
assetsInlineLimit,
|
|
22
|
+
emptyOutDir,
|
|
23
|
+
minify
|
|
24
|
+
},
|
|
25
|
+
optimizeDeps: { force },
|
|
26
|
+
clearScreen,
|
|
27
|
+
logLevel,
|
|
28
|
+
plugins: [{
|
|
29
|
+
name: "react-router:cli-config",
|
|
30
|
+
configEnvironment(name) {
|
|
31
|
+
if (sourcemapClient && name === "client") return { build: { sourcemap: sourcemapClient } };
|
|
32
|
+
if (sourcemapServer && name !== "client") return { build: { sourcemap: sourcemapServer } };
|
|
33
|
+
},
|
|
34
|
+
configResolved(config) {
|
|
35
|
+
if (!config.plugins.find((plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc")) throw new Error("React Router Vite plugin not found in Vite config");
|
|
36
|
+
}
|
|
37
|
+
}]
|
|
38
|
+
})).buildApp();
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { build };
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export { };
|