|
8 | 8 |
|
9 | 9 | ### Patch Changes |
10 | 10 |
|
11 | | -- support for prerendering multiple server bundles with v8\_viteEnvironmentApi ([#14921](https://github.com/remix-run/react-router/pull/14921)) |
| 11 | +- support for prerendering multiple server bundles with v8_viteEnvironmentApi ([#14921](https://github.com/remix-run/react-router/pull/14921)) |
12 | 12 |
|
13 | 13 | - rsc framework mode prerender / spa mode support ([#14907](https://github.com/remix-run/react-router/pull/14907)) |
14 | 14 |
|
|
89 | 89 | By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params). |
90 | 90 |
|
91 | 91 | Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits: |
92 | | - |
93 | 92 | - Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path |
94 | 93 | - Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes) |
95 | 94 |
|
|
165 | 164 |
|
166 | 165 | | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | |
167 | 166 | | ------------ | ----------------- | ------------------------ | |
168 | | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | |
169 | | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | |
| 167 | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | |
| 168 | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | |
170 | 169 |
|
171 | 170 | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | |
172 | 171 | | ------------- | ----------------- | ------------------------ | |
173 | | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | |
| 172 | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | |
174 | 173 | | **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ | |
175 | 174 |
|
176 | 175 | With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests: |
177 | 176 |
|
178 | 177 | | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | |
179 | 178 | | ------------ | ----------------- | ------------------------ | |
180 | | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | |
181 | | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | |
| 179 | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | |
| 180 | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | |
182 | 181 |
|
183 | 182 | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | |
184 | 183 | | ------------- | ------------------ | ------------------------ | |
185 | | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | |
186 | | - | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | |
| 184 | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | |
| 185 | + | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | |
187 | 186 |
|
188 | 187 | This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic. |
189 | 188 |
|
|
441 | 440 | - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) |
442 | 441 |
|
443 | 442 | We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: |
444 | | - |
445 | 443 | - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) |
446 | 444 | - [`createContext`](https://reactrouter.com/api/utils/createContext) |
447 | 445 | - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option |
|
1184 | 1182 | ``` |
1185 | 1183 |
|
1186 | 1184 | This initial implementation targets type inference for: |
1187 | | -
|
1188 | 1185 | - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing |
1189 | 1186 | - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module |
1190 | 1187 | - `ActionData` : Action data from `action` and/or `clientAction` within your route module |
|
1199 | 1196 | ``` |
1200 | 1197 |
|
1201 | 1198 | Check out our docs for more: |
1202 | | -
|
1203 | 1199 | - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) |
1204 | 1200 | - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) |
1205 | 1201 |
|
|
1399 | 1395 | - Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654)) |
1400 | 1396 |
|
1401 | 1397 | - Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613)) |
1402 | | -
|
1403 | 1398 | - `--sourcemapClient` |
1404 | 1399 |
|
1405 | 1400 | - `--sourcemapClient=inline` |
|
1736 | 1731 | - Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)) ([#8173](https://github.com/remix-run/remix/pull/8173)) |
1737 | 1732 |
|
1738 | 1733 | Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as: |
1739 | | -
|
1740 | 1734 | - Leveraging a data source local to the browser (i.e., `localStorage`) |
1741 | 1735 | - Managing a client-side cache of server data (like `IndexedDB`) |
1742 | 1736 | - Bypassing the Remix server in a BFF setup and hitting your API directly from the browser |
|
2140 | 2134 | - Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772)) |
2141 | 2135 |
|
2142 | 2136 | Written to server build directory (`build/` by default): |
2143 | | -
|
2144 | 2137 | - `metafile.css.json` |
2145 | 2138 | - `metafile.js.json` (browser JS) |
2146 | 2139 | - `metafile.server.json` (server JS) |
|
2238 | 2231 | - built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483)) |
2239 | 2232 |
|
2240 | 2233 | New options: |
2241 | | -
|
2242 | 2234 | - `--tls-key` / `tlsKey`: TLS key |
2243 | 2235 | - `--tls-cert` / `tlsCert`: TLS Certificate |
2244 | 2236 |
|
|
2509 | 2501 | ``` |
2510 | 2502 |
|
2511 | 2503 | The dev server will: |
2512 | | -
|
2513 | 2504 | - force `NODE_ENV=development` and warn you if it was previously set to something else |
2514 | 2505 | - rebuild your app whenever your Remix app code changes |
2515 | 2506 | - restart your app server whenever rebuilds succeed |
|
0 commit comments