@react-router/dev 7.2.0-pre.6 → 7.3.0-pre.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 +45 -69
- package/README.md +1 -1
- package/dist/cli/index.js +141 -191
- package/dist/config/defaults/entry.server.node.tsx +2 -0
- package/dist/config.d.ts +6 -2
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.d.ts +3 -2
- package/dist/vite/cloudflare.js +64 -44
- package/dist/vite.js +371 -182
- package/package.json +9 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,55 +1,49 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
-
## 7.
|
|
3
|
+
## 7.3.0-pre.0
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Patch Changes
|
|
7
|
+
- Fix support for custom client `build.rollupOptions.output.entryFileNames` ([#13098](https://github.com/remix-run/react-router/pull/13098))
|
|
8
|
+
- Fix usage of `prerender` option when `serverBundles` option has been configured or provided by a preset, e.g. `vercelPreset` from `@vercel/react-router` ([#13082](https://github.com/remix-run/react-router/pull/13082))
|
|
9
|
+
- Fix support for custom `build.assetsDir` ([#13077](https://github.com/remix-run/react-router/pull/13077))
|
|
10
|
+
- Remove unused dependencies ([#13134](https://github.com/remix-run/react-router/pull/13134))
|
|
11
|
+
- Stub all routes except root in "SPA Mode" server builds to avoid issues when route modules or their dependencies import non-SSR-friendly modules ([#13023](https://github.com/remix-run/react-router/pull/13023))
|
|
12
|
+
- Fix errors with `future.unstable_viteEnvironmentApi` when the `ssr` environment has been configured by another plugin to be a custom `Vite.DevEnvironment` rather than the default `Vite.RunnableDevEnvironment` ([#13008](https://github.com/remix-run/react-router/pull/13008))
|
|
13
|
+
- Remove unused Vite file system watcher ([#13133](https://github.com/remix-run/react-router/pull/13133))
|
|
14
|
+
- Fix support for custom SSR build input when `serverBundles` option has been configured ([#13107](https://github.com/remix-run/react-router/pull/13107))
|
|
16
15
|
|
|
17
|
-
|
|
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
|
|
16
|
+
Note that for consumers using the `future.unstable_viteEnvironmentApi` and `serverBundles` options together, hyphens are no longer supported in server bundle IDs since they also need to be valid Vite environment names.
|
|
25
17
|
|
|
26
|
-
- Fix
|
|
18
|
+
- Fix dev server when using HTTPS by stripping HTTP/2 pseudo headers from dev server requests ([#12830](https://github.com/remix-run/react-router/pull/12830))
|
|
19
|
+
- Lazy load Cloudflare platform proxy on first dev server request when using the `cloudflareDevProxy` Vite plugin to avoid creating unnecessary workerd processes ([#13016](https://github.com/remix-run/react-router/pull/13016))
|
|
20
|
+
- When `future.unstable_viteEnvironmentApi` is enabled and the `ssr` environment has `optimizeDeps.noDiscovery` disabled, define `optimizeDeps.entries` and `optimizeDeps.include` ([#13007](https://github.com/remix-run/react-router/pull/13007))
|
|
21
|
+
- Fix duplicated entries in typegen for layout routes and their corresponding index route ([#13140](https://github.com/remix-run/react-router/pull/13140))
|
|
27
22
|
- Updated dependencies:
|
|
28
|
-
- `react-router@7.
|
|
29
|
-
- `@react-router/node@7.
|
|
30
|
-
- `@react-router/serve@7.
|
|
31
|
-
|
|
32
|
-
## 7.2.0-pre.3
|
|
33
|
-
|
|
34
|
-
### Patch Changes
|
|
23
|
+
- `react-router@7.3.0-pre.0`
|
|
24
|
+
- `@react-router/node@7.3.0-pre.0`
|
|
25
|
+
- `@react-router/serve@7.3.0-pre.0`
|
|
35
26
|
|
|
36
|
-
|
|
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`
|
|
27
|
+
## 7.2.0
|
|
40
28
|
|
|
41
|
-
|
|
29
|
+
### Minor Changes
|
|
42
30
|
|
|
43
|
-
|
|
31
|
+
- 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
32
|
|
|
45
|
-
-
|
|
46
|
-
- `
|
|
47
|
-
-
|
|
48
|
-
|
|
33
|
+
- 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
|
|
34
|
+
- 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
|
|
35
|
+
- 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
|
|
36
|
+
- The generated HTML would include the root index route which prevented hydration for any other paths
|
|
37
|
+
- 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
|
|
38
|
+
- 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
|
|
39
|
+
- `npx sirv-cli build/client --single __spa-fallback.html`
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
- 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
42
|
|
|
52
|
-
|
|
43
|
+
- `Route.HydrateFallbackProps` now also receives `loaderData`
|
|
44
|
+
- This will be defined so long as the `HydrateFallback` is rendering while _children_ routes are loading
|
|
45
|
+
- This will be `undefined` if the `HydrateFallback` is rendering because the route has it's own hydrating `clientLoader`
|
|
46
|
+
- In SPA mode, this will allow you to render loader root data into the SPA `index.html`
|
|
53
47
|
|
|
54
48
|
- 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
49
|
|
|
@@ -69,6 +63,8 @@
|
|
|
69
63
|
|
|
70
64
|
### Patch Changes
|
|
71
65
|
|
|
66
|
+
- Handle custom `envDir` in Vite config ([#12969](https://github.com/remix-run/react-router/pull/12969))
|
|
67
|
+
|
|
72
68
|
- Fix typegen for repeated params ([#13012](https://github.com/remix-run/react-router/pull/13012))
|
|
73
69
|
|
|
74
70
|
In React Router, path parameters are keyed by their name.
|
|
@@ -81,37 +77,12 @@
|
|
|
81
77
|
To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters.
|
|
82
78
|
So `/a/1/b/2/c/3` now generates a type like `{ id: 3 }`.
|
|
83
79
|
|
|
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`
|
|
80
|
+
- Fix CLI parsing to allow argumentless `npx react-router` usage ([#12925](https://github.com/remix-run/react-router/pull/12925))
|
|
109
81
|
|
|
110
|
-
|
|
82
|
+
- Fix `ArgError: unknown or unexpected option: --version` when running `react-router --version` ([#13012](https://github.com/remix-run/react-router/pull/13012))
|
|
111
83
|
|
|
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
84
|
- Skip action-only resource routes when using `prerender:true` ([#13004](https://github.com/remix-run/react-router/pull/13004))
|
|
85
|
+
|
|
115
86
|
- Enhance invalid export detection when using `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
|
|
116
87
|
|
|
117
88
|
- `headers`/`action` are prohibited in all routes with `ssr:false` because there will be no runtime server on which to run them
|
|
@@ -122,17 +93,22 @@
|
|
|
122
93
|
- 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
94
|
|
|
124
95
|
- Limit prerendered resource route `.data` files to only the target route ([#13004](https://github.com/remix-run/react-router/pull/13004))
|
|
96
|
+
|
|
125
97
|
- Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` ([#11871](https://github.com/remix-run/react-router/pull/11871))
|
|
98
|
+
|
|
99
|
+
- Fix prerendering of binary files ([#13039](https://github.com/remix-run/react-router/pull/13039))
|
|
100
|
+
|
|
126
101
|
- Add `future.unstable_viteEnvironmentApi` flag to enable experimental Vite Environment API support ([#12936](https://github.com/remix-run/react-router/pull/12936))
|
|
102
|
+
|
|
127
103
|
- 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
104
|
|
|
129
105
|
- 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
106
|
- 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
107
|
|
|
132
108
|
- Updated dependencies:
|
|
133
|
-
- `react-router@7.2.0
|
|
134
|
-
- `@react-router/node@7.2.0
|
|
135
|
-
- `@react-router/serve@7.2.0
|
|
109
|
+
- `react-router@7.2.0`
|
|
110
|
+
- `@react-router/node@7.2.0`
|
|
111
|
+
- `@react-router/serve@7.2.0`
|
|
136
112
|
|
|
137
113
|
## 7.1.5
|
|
138
114
|
|
package/README.md
CHANGED