@react-router/dev 7.2.0-pre.6 → 7.2.0
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 +28 -76
- package/dist/cli/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,55 +1,25 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
-
## 7.2.0
|
|
3
|
+
## 7.2.0
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- [REMOVE] Update invalid route export messages ([#13049](https://github.com/remix-run/react-router/pull/13049))
|
|
8
|
-
- Updated dependencies:
|
|
9
|
-
- `react-router@7.2.0-pre.6`
|
|
10
|
-
- `@react-router/node@7.2.0-pre.6`
|
|
11
|
-
- `@react-router/serve@7.2.0-pre.6`
|
|
12
|
-
|
|
13
|
-
## 7.2.0-pre.5
|
|
14
|
-
|
|
15
|
-
### Patch Changes
|
|
16
|
-
|
|
17
|
-
- Updated dependencies:
|
|
18
|
-
- `react-router@7.2.0-pre.5`
|
|
19
|
-
- `@react-router/node@7.2.0-pre.5`
|
|
20
|
-
- `@react-router/serve@7.2.0-pre.5`
|
|
21
|
-
|
|
22
|
-
## 7.2.0-pre.4
|
|
23
|
-
|
|
24
|
-
### Patch Changes
|
|
25
|
-
|
|
26
|
-
- Fix prerendering of binary files ([#13039](https://github.com/remix-run/react-router/pull/13039))
|
|
27
|
-
- Updated dependencies:
|
|
28
|
-
- `react-router@7.2.0-pre.4`
|
|
29
|
-
- `@react-router/node@7.2.0-pre.4`
|
|
30
|
-
- `@react-router/serve@7.2.0-pre.4`
|
|
31
|
-
|
|
32
|
-
## 7.2.0-pre.3
|
|
33
|
-
|
|
34
|
-
### Patch Changes
|
|
35
|
-
|
|
36
|
-
- Updated dependencies:
|
|
37
|
-
- `react-router@7.2.0-pre.3`
|
|
38
|
-
- `@react-router/node@7.2.0-pre.3`
|
|
39
|
-
- `@react-router/serve@7.2.0-pre.3`
|
|
40
|
-
|
|
41
|
-
## 7.2.0-pre.2
|
|
5
|
+
### Minor Changes
|
|
42
6
|
|
|
43
|
-
|
|
7
|
+
- Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the `/` route with `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
44
8
|
|
|
45
|
-
-
|
|
46
|
-
- `
|
|
47
|
-
-
|
|
48
|
-
|
|
9
|
+
- If you specify `ssr:false` without a `prerender` config, this is considered "SPA Mode" and the generated `index.html` file will only render down to the root route and will be able to hydrate for any valid application path
|
|
10
|
+
- If you specify `ssr:false` with a `prerender` config but _do not_ include the `/` path (i.e., `prerender: ['/blog/post']`), then we still generate a "SPA Mode" `index.html` file that can hydrate for any path in the application
|
|
11
|
+
- However, previously if you specified `ssr:false` and included the `/` path in your `prerender` config, we would prerender the `/` route into `index.html` as a non-SPA page
|
|
12
|
+
- The generated HTML would include the root index route which prevented hydration for any other paths
|
|
13
|
+
- With this change, we now generate a "SPA Mode" file in `__spa-fallback.html` that will allow you to hydrate for any non-prerendered paths
|
|
14
|
+
- You can serve this file from your static file server for any paths that would otherwise 404 if you only want to pre-render _some_ routes in your `ssr:false` app and serve the others as a SPA
|
|
15
|
+
- `npx sirv-cli build/client --single __spa-fallback.html`
|
|
49
16
|
|
|
50
|
-
|
|
17
|
+
- Allow a `loader` in the root route in SPA mode because it can be called/server-rendered at build time ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
51
18
|
|
|
52
|
-
|
|
19
|
+
- `Route.HydrateFallbackProps` now also receives `loaderData`
|
|
20
|
+
- This will be defined so long as the `HydrateFallback` is rendering while _children_ routes are loading
|
|
21
|
+
- This will be `undefined` if the `HydrateFallback` is rendering because the route has it's own hydrating `clientLoader`
|
|
22
|
+
- In SPA mode, this will allow you to render loader root data into the SPA `index.html`
|
|
53
23
|
|
|
54
24
|
- New type-safe `href` utility that guarantees links point to actual paths in your app ([#13012](https://github.com/remix-run/react-router/pull/13012))
|
|
55
25
|
|
|
@@ -69,6 +39,8 @@
|
|
|
69
39
|
|
|
70
40
|
### Patch Changes
|
|
71
41
|
|
|
42
|
+
- Handle custom `envDir` in Vite config ([#12969](https://github.com/remix-run/react-router/pull/12969))
|
|
43
|
+
|
|
72
44
|
- Fix typegen for repeated params ([#13012](https://github.com/remix-run/react-router/pull/13012))
|
|
73
45
|
|
|
74
46
|
In React Router, path parameters are keyed by their name.
|
|
@@ -81,37 +53,12 @@
|
|
|
81
53
|
To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters.
|
|
82
54
|
So `/a/1/b/2/c/3` now generates a type like `{ id: 3 }`.
|
|
83
55
|
|
|
84
|
-
- Fix
|
|
85
|
-
- Updated dependencies:
|
|
86
|
-
- `react-router@7.2.0-pre.1`
|
|
87
|
-
- `@react-router/node@7.2.0-pre.1`
|
|
88
|
-
- `@react-router/serve@7.2.0-pre.1`
|
|
89
|
-
|
|
90
|
-
## 7.2.0-pre.0
|
|
91
|
-
|
|
92
|
-
### Minor Changes
|
|
93
|
-
|
|
94
|
-
- Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the `/` route with `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
95
|
-
|
|
96
|
-
- If you specify `ssr:false` without a `prerender` config, this is considered "SPA Mode" and the generated `index.html` file will only render down to the root route and will be able to hydrate for any valid application path
|
|
97
|
-
- If you specify `ssr:false` with a `prerender` config but _do not_ include the `/` path (i.e., `prerender: ['/blog/post']`), then we still generate a "SPA Mode" `index.html` file that can hydrate for any path in the application
|
|
98
|
-
- However, previously if you specified `ssr:false` and included the `/` path in your `prerender` config, we would prerender the `/` route into `index.html` as a non-SPA page
|
|
99
|
-
- The generated HTML would include the root index route which prevented hydration for any other paths
|
|
100
|
-
- With this change, we now generate a "SPA Mode" file in `__spa-fallback.html` that will allow you to hydrate for any non-prerendered paths
|
|
101
|
-
- You can serve this file from your static file server for any paths that would otherwise 404 if you only want to pre-render _some_ routes in your `ssr:false` app and serve the others as a SPA
|
|
102
|
-
- `npx sirv-cli build/client --single __spa-fallback.html`
|
|
103
|
-
|
|
104
|
-
- - Allow a `loader` in the root route in SPA mode because it can be called/server-rendered at build time ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
105
|
-
- `Route.HydrateFallbackProps` now also receives `loaderData`
|
|
106
|
-
- This will be defined so long as the `HydrateFallback` is rendering while _children_ routes are loading
|
|
107
|
-
- This will be `undefined` if the `HydrateFallback` is rendering because the route has it's own hydrating `clientLoader`
|
|
108
|
-
- In SPA mode, this will allow you to render loader root data into the SPA `index.html`
|
|
56
|
+
- Fix CLI parsing to allow argumentless `npx react-router` usage ([#12925](https://github.com/remix-run/react-router/pull/12925))
|
|
109
57
|
|
|
110
|
-
|
|
58
|
+
- Fix `ArgError: unknown or unexpected option: --version` when running `react-router --version` ([#13012](https://github.com/remix-run/react-router/pull/13012))
|
|
111
59
|
|
|
112
|
-
- Handle custom `envDir` in Vite config ([#12969](https://github.com/remix-run/react-router/pull/12969))
|
|
113
|
-
- Fix CLI parsing to allow argumentless `npx react-router` usage ([#12925](https://github.com/remix-run/react-router/pull/12925))
|
|
114
60
|
- Skip action-only resource routes when using `prerender:true` ([#13004](https://github.com/remix-run/react-router/pull/13004))
|
|
61
|
+
|
|
115
62
|
- Enhance invalid export detection when using `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
116
63
|
|
|
117
64
|
- `headers`/`action` are prohibited in all routes with `ssr:false` because there will be no runtime server on which to run them
|
|
@@ -122,17 +69,22 @@
|
|
|
122
69
|
- Exporting a `loader` from a route that is never matched by a `prerender` path will throw a build time error because there will be no runtime server to ever run the loader
|
|
123
70
|
|
|
124
71
|
- Limit prerendered resource route `.data` files to only the target route ([#13004](https://github.com/remix-run/react-router/pull/13004))
|
|
72
|
+
|
|
125
73
|
- Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` ([#11871](https://github.com/remix-run/react-router/pull/11871))
|
|
74
|
+
|
|
75
|
+
- Fix prerendering of binary files ([#13039](https://github.com/remix-run/react-router/pull/13039))
|
|
76
|
+
|
|
126
77
|
- Add `future.unstable_viteEnvironmentApi` flag to enable experimental Vite Environment API support ([#12936](https://github.com/remix-run/react-router/pull/12936))
|
|
78
|
+
|
|
127
79
|
- Disable Lazy Route Discovery for all `ssr:false` apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured `__manifest` requests ([#12894](https://github.com/remix-run/react-router/pull/12894))
|
|
128
80
|
|
|
129
81
|
- We previously only disabled this for "SPA Mode" which is `ssr:false` and no `prerender` config but we realized it should apply to all `ssr:false` apps, including those prerendering multiple pages
|
|
130
82
|
- In those `prerender` scenarios we would prerender the `/__manifest` file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
|
|
131
83
|
|
|
132
84
|
- Updated dependencies:
|
|
133
|
-
- `react-router@7.2.0
|
|
134
|
-
- `@react-router/node@7.2.0
|
|
135
|
-
- `@react-router/serve@7.2.0
|
|
85
|
+
- `react-router@7.2.0`
|
|
86
|
+
- `@react-router/node@7.2.0`
|
|
87
|
+
- `@react-router/serve@7.2.0`
|
|
136
88
|
|
|
137
89
|
## 7.1.5
|
|
138
90
|
|
package/dist/cli/index.js
CHANGED
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "7.2.0
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"set-cookie-parser": "^2.6.0",
|
|
89
89
|
"valibot": "^0.41.0",
|
|
90
90
|
"vite-node": "3.0.0-beta.2",
|
|
91
|
-
"@react-router/node": "7.2.0
|
|
91
|
+
"@react-router/node": "7.2.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/babel__core": "^7.20.5",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"vite": "^6.0.0",
|
|
118
118
|
"wireit": "0.14.9",
|
|
119
119
|
"wrangler": "^3.28.2",
|
|
120
|
-
"@react-router/serve": "7.2.0
|
|
121
|
-
"react-router": "^7.2.0
|
|
120
|
+
"@react-router/serve": "7.2.0",
|
|
121
|
+
"react-router": "^7.2.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"typescript": "^5.1.0",
|
|
125
125
|
"vite": "^5.1.0 || ^6.0.0",
|
|
126
126
|
"wrangler": "^3.28.2",
|
|
127
|
-
"@react-router/serve": "^7.2.0
|
|
128
|
-
"react-router": "^7.2.0
|
|
127
|
+
"@react-router/serve": "^7.2.0",
|
|
128
|
+
"react-router": "^7.2.0"
|
|
129
129
|
},
|
|
130
130
|
"peerDependenciesMeta": {
|
|
131
131
|
"@react-router/serve": {
|