@react-router/dev 0.0.0-experimental-c0856287f
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 +1773 -0
- package/LICENSE.md +23 -0
- package/README.md +13 -0
- package/dist/cli/commands.d.ts +12 -0
- package/dist/cli/commands.js +174 -0
- package/dist/cli/detectPackageManager.d.ts +10 -0
- package/dist/cli/detectPackageManager.js +39 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +19 -0
- package/dist/cli/run.d.ts +5 -0
- package/dist/cli/run.js +180 -0
- package/dist/cli/useJavascript.d.ts +4 -0
- package/dist/cli/useJavascript.js +66 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +21 -0
- package/dist/colors.d.ts +17 -0
- package/dist/colors.js +49 -0
- package/dist/config/defaults/entry.client.tsx +12 -0
- package/dist/config/defaults/entry.dev.d.ts +2 -0
- package/dist/config/defaults/entry.dev.ts +13 -0
- package/dist/config/defaults/entry.server.cloudflare.tsx +55 -0
- package/dist/config/defaults/entry.server.deno.tsx +55 -0
- package/dist/config/defaults/entry.server.node.tsx +155 -0
- package/dist/config/defaults/entry.server.spa.tsx +20 -0
- package/dist/config/flat-routes.d.ts +14 -0
- package/dist/config/flat-routes.js +418 -0
- package/dist/config/format.d.ts +5 -0
- package/dist/config/format.js +68 -0
- package/dist/config/routes.d.ts +98 -0
- package/dist/config/routes.js +93 -0
- package/dist/config/serverModes.d.ts +9 -0
- package/dist/config/serverModes.js +28 -0
- package/dist/config.d.ts +75 -0
- package/dist/config.js +152 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +23 -0
- package/dist/invariant.d.ts +2 -0
- package/dist/invariant.js +22 -0
- package/dist/manifest.d.ts +28 -0
- package/dist/vite/babel.d.ts +20 -0
- package/dist/vite/babel.js +49 -0
- package/dist/vite/build.d.ts +15 -0
- package/dist/vite/build.js +271 -0
- package/dist/vite/cloudflare-proxy-plugin.d.ts +15 -0
- package/dist/vite/cloudflare-proxy-plugin.js +82 -0
- package/dist/vite/dev.d.ts +15 -0
- package/dist/vite/dev.js +81 -0
- package/dist/vite/import-vite-esm-sync.d.ts +4 -0
- package/dist/vite/import-vite-esm-sync.js +28 -0
- package/dist/vite/index.d.ts +4 -0
- package/dist/vite/index.js +30 -0
- package/dist/vite/node-adapter.d.ts +6 -0
- package/dist/vite/node-adapter.js +78 -0
- package/dist/vite/plugin.d.ts +165 -0
- package/dist/vite/plugin.js +1178 -0
- package/dist/vite/profiler.d.ts +5 -0
- package/dist/vite/profiler.js +55 -0
- package/dist/vite/remove-exports-test.d.ts +1 -0
- package/dist/vite/remove-exports.d.ts +2 -0
- package/dist/vite/remove-exports.js +278 -0
- package/dist/vite/resolve-file-url.d.ts +3 -0
- package/dist/vite/resolve-file-url.js +53 -0
- package/dist/vite/static/refresh-utils.cjs +185 -0
- package/dist/vite/styles.d.ts +13 -0
- package/dist/vite/styles.js +176 -0
- package/dist/vite/vmod.d.ts +3 -0
- package/dist/vite/vmod.js +21 -0
- package/package.json +107 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,1773 @@
|
|
|
1
|
+
# `@remix-run/dev`
|
|
2
|
+
|
|
3
|
+
## 2.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- New `future.unstable_singleFetch` flag ([#8773](https://github.com/remix-run/remix/pull/8773))
|
|
8
|
+
|
|
9
|
+
- Naked objects returned from loaders/actions are no longer automatically converted to JSON responses. They'll be streamed as-is via `turbo-stream` so `Date`'s will become `Date` through `useLoaderData()`
|
|
10
|
+
- You can return naked objects with `Promise`'s without needing to use `defer()` - including nested `Promise`'s
|
|
11
|
+
- If you need to return a custom status code or custom response headers, you can still use the `defer` utility
|
|
12
|
+
- `<RemixServer abortDelay>` is no longer used. Instead, you should `export const streamTimeout` from `entry.server.tsx` and the remix server runtime will use that as the delay to abort the streamed response
|
|
13
|
+
- If you export your own streamTimeout, you should decouple that from aborting the react `renderToPipeableStream`. You should always ensure that react is aborted _afer_ the stream is aborted so that abort rejections can be flushed down
|
|
14
|
+
- Actions no longer automatically revalidate on 4xx/5xx responses (via RR `future.unstable_skipActionErrorRevalidation` flag) - you can return a 2xx to opt-into revalidation or use `shouldRevalidate`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Improve `getDependenciesToBundle` resolution in monorepos ([#8848](https://github.com/remix-run/remix/pull/8848))
|
|
19
|
+
- Fix SPA mode when single fetch is enabled by using streaming entry.server ([#9063](https://github.com/remix-run/remix/pull/9063))
|
|
20
|
+
- Vite: added sourcemap support for transformed routes ([#8970](https://github.com/remix-run/remix/pull/8970))
|
|
21
|
+
- Update links printed to the console by the Remix CLI/Dev Server to point to updated docs locations ([#9176](https://github.com/remix-run/remix/pull/9176))
|
|
22
|
+
- Updated dependencies:
|
|
23
|
+
- `@remix-run/node@2.9.0`
|
|
24
|
+
- `@remix-run/server-runtime@2.9.0`
|
|
25
|
+
|
|
26
|
+
## 2.8.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Support reading from Vite config when running `remix reveal` and `remix routes` CLI commands ([#8916](https://github.com/remix-run/remix/pull/8916))
|
|
31
|
+
- Add Vite commands to Remix CLI `--help` output ([#8939](https://github.com/remix-run/remix/pull/8939))
|
|
32
|
+
- Vite: Fix support for `build.sourcemap` option in Vite config ([#8965](https://github.com/remix-run/remix/pull/8965))
|
|
33
|
+
- Clean up redundant client route query strings on route JavaScript files in production builds ([#8969](https://github.com/remix-run/remix/pull/8969))
|
|
34
|
+
- Vite: Fix error when using Vite's `server.fs.allow` option without a client entry file ([#8966](https://github.com/remix-run/remix/pull/8966))
|
|
35
|
+
- Updated dependencies:
|
|
36
|
+
- `@remix-run/node@2.8.1`
|
|
37
|
+
- `@remix-run/server-runtime@2.8.1`
|
|
38
|
+
|
|
39
|
+
## 2.8.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- Pass resolved `viteConfig` to Remix Vite plugin's `buildEnd` hook ([#8885](https://github.com/remix-run/remix/pull/8885))
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Mark `Layout` as browser safe route export in `esbuild` compiler ([#8842](https://github.com/remix-run/remix/pull/8842))
|
|
48
|
+
- Vite: Silence build warnings when dependencies include "use client" directives ([#8897](https://github.com/remix-run/remix/pull/8897))
|
|
49
|
+
- Vite: Fix `serverBundles` issue where multiple browser manifests are generated ([#8864](https://github.com/remix-run/remix/pull/8864))
|
|
50
|
+
- Support custom Vite `build.assetsDir` option ([#8843](https://github.com/remix-run/remix/pull/8843))
|
|
51
|
+
- Updated dependencies:
|
|
52
|
+
- `@remix-run/node@2.8.0`
|
|
53
|
+
- `@remix-run/server-runtime@2.8.0`
|
|
54
|
+
|
|
55
|
+
## 2.7.2
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Vite: Fix error when building projects with `.css?url` imports ([#8829](https://github.com/remix-run/remix/pull/8829))
|
|
60
|
+
- Updated dependencies:
|
|
61
|
+
- `@remix-run/node@2.7.2`
|
|
62
|
+
- `@remix-run/server-runtime@2.7.2`
|
|
63
|
+
|
|
64
|
+
## 2.7.1
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- Updated dependencies:
|
|
69
|
+
- `@remix-run/node@2.7.1`
|
|
70
|
+
- `@remix-run/server-runtime@2.7.1`
|
|
71
|
+
|
|
72
|
+
## 2.7.0
|
|
73
|
+
|
|
74
|
+
### Minor Changes
|
|
75
|
+
|
|
76
|
+
- Allow an optional `Layout` export from the root route ([#8709](https://github.com/remix-run/remix/pull/8709))
|
|
77
|
+
|
|
78
|
+
- Vite: Cloudflare Proxy as a Vite plugin ([#8749](https://github.com/remix-run/remix/pull/8749))
|
|
79
|
+
|
|
80
|
+
**This is a breaking change for projects relying on Cloudflare support from the unstable Vite plugin**
|
|
81
|
+
|
|
82
|
+
The Cloudflare preset (`unstable_cloudflarePreset`) as been removed and replaced with a new Vite plugin:
|
|
83
|
+
|
|
84
|
+
```diff
|
|
85
|
+
import {
|
|
86
|
+
unstable_vitePlugin as remix,
|
|
87
|
+
- unstable_cloudflarePreset as cloudflare,
|
|
88
|
+
+ cloudflareDevProxyVitePlugin as remixCloudflareDevProxy,
|
|
89
|
+
} from "@remix-run/dev";
|
|
90
|
+
import { defineConfig } from "vite";
|
|
91
|
+
|
|
92
|
+
export default defineConfig({
|
|
93
|
+
plugins: [
|
|
94
|
+
+ remixCloudflareDevProxy(),
|
|
95
|
+
+ remix(),
|
|
96
|
+
- remix({
|
|
97
|
+
- presets: [cloudflare()],
|
|
98
|
+
- }),
|
|
99
|
+
],
|
|
100
|
+
- ssr: {
|
|
101
|
+
- resolve: {
|
|
102
|
+
- externalConditions: ["workerd", "worker"],
|
|
103
|
+
- },
|
|
104
|
+
- },
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`remixCloudflareDevProxy` must come _before_ the `remix` plugin so that it can override Vite's dev server middleware to be compatible with Cloudflare's proxied environment.
|
|
109
|
+
|
|
110
|
+
Because it is a Vite plugin, `remixCloudflareDevProxy` can set `ssr.resolve.externalConditions` to be `workerd`-compatible for you.
|
|
111
|
+
|
|
112
|
+
`remixCloudflareDevProxy` accepts a `getLoadContext` function that replaces the old `getRemixDevLoadContext`.
|
|
113
|
+
If you were using a `nightly` version that required `getBindingsProxy` or `getPlatformProxy`, that is no longer required.
|
|
114
|
+
Any options you were passing to `getBindingsProxy` or `getPlatformProxy` should now be passed to `remixCloudflareDevProxy` instead.
|
|
115
|
+
|
|
116
|
+
This API also better aligns with future plans to support Cloudflare with a framework-agnostic Vite plugin that makes use of Vite's (experimental) Runtime API.
|
|
117
|
+
|
|
118
|
+
- Vite: Stabilize the Remix Vite plugin, Cloudflare preset, and all related types by removing all `unstable_` / `Unstable_` prefixes. ([#8713](https://github.com/remix-run/remix/pull/8713))
|
|
119
|
+
|
|
120
|
+
While this is a breaking change for existing Remix Vite plugin consumers, now that the plugin has stabilized, there will no longer be any breaking changes outside of a major release. Thank you to all of our early adopters and community contributors for helping us get here! 🙏
|
|
121
|
+
|
|
122
|
+
- Vite: Stabilize "SPA Mode" by renaming the Remix vite plugin config from `unstable_ssr -> ssr` ([#8692](https://github.com/remix-run/remix/pull/8692))
|
|
123
|
+
|
|
124
|
+
- Vite: Add a new `basename` option to the Vite plugin, allowing users to set the internal React Router [`basename`](https://reactrouter.com/en/main/routers/create-browser-router#basename) in order to to serve their applications underneath a subpath ([#8145](https://github.com/remix-run/remix/pull/8145))
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Vite: fix server exports dead-code elimination for routes outside of app directory ([#8795](https://github.com/remix-run/remix/pull/8795))
|
|
129
|
+
|
|
130
|
+
- Always prepend DOCTYPE in SPA mode entry.server.tsx, can opt out via remix reveal ([#8725](https://github.com/remix-run/remix/pull/8725))
|
|
131
|
+
|
|
132
|
+
- Fix build issue in SPA mode when using a `basename` ([#8720](https://github.com/remix-run/remix/pull/8720))
|
|
133
|
+
|
|
134
|
+
- Vite: Validate that the MDX Rollup plugin, if present, is placed before Remix in Vite config ([#8690](https://github.com/remix-run/remix/pull/8690))
|
|
135
|
+
|
|
136
|
+
- Vite: reliably detect non-root routes in Windows ([#8806](https://github.com/remix-run/remix/pull/8806))
|
|
137
|
+
|
|
138
|
+
Sometimes route `file` will be unnormalized Windows path with `\` instead of `/`.
|
|
139
|
+
|
|
140
|
+
- Vite: Pass `remixUserConfig` to preset `remixConfig` hook ([#8797](https://github.com/remix-run/remix/pull/8797))
|
|
141
|
+
|
|
142
|
+
- Vite: Fix issue resolving critical CSS during development when the current working directory differs from the project root ([#8752](https://github.com/remix-run/remix/pull/8752))
|
|
143
|
+
|
|
144
|
+
- Vite: Ensure CSS file URLs that are only referenced in the server build are available on the client ([#8796](https://github.com/remix-run/remix/pull/8796))
|
|
145
|
+
|
|
146
|
+
- Vite: Require version 5.1.0 to support `.css?url` imports ([#8723](https://github.com/remix-run/remix/pull/8723))
|
|
147
|
+
|
|
148
|
+
- Fix type error in Remix config for synchronous `routes` function ([#8745](https://github.com/remix-run/remix/pull/8745))
|
|
149
|
+
|
|
150
|
+
- Vite: Support Vite v5.1.0's `.css?url` imports ([#8684](https://github.com/remix-run/remix/pull/8684))
|
|
151
|
+
|
|
152
|
+
- Always ignore route files starting with `.` ([#8801](https://github.com/remix-run/remix/pull/8801))
|
|
153
|
+
|
|
154
|
+
- Vite: Enable use of [`vite preview`](https://main.vitejs.dev/guide/static-deploy.html#deploying-a-static-site) to preview Remix SPA applications ([#8624](https://github.com/remix-run/remix/pull/8624))
|
|
155
|
+
|
|
156
|
+
- In the SPA template, `npm run start` has been renamed to `npm run preview` which uses `vite preview` instead of a standalone HTTP server such as `http-server` or `serv-cli`
|
|
157
|
+
|
|
158
|
+
- Vite: Remove the ability to pass `publicPath` as an option to the Remix vite plugin ([#8145](https://github.com/remix-run/remix/pull/8145))
|
|
159
|
+
|
|
160
|
+
- ⚠️ **This is a breaking change for projects using the unstable Vite plugin with a `publicPath`**
|
|
161
|
+
- This is already handled in Vite via the [`base`](https://vitejs.dev/guide/build.html#public-base-path) config so we now set the Remix `publicPath` from the Vite `base` config
|
|
162
|
+
|
|
163
|
+
- Vite: Fix issue where client route file requests fail if search params have been parsed and serialized before reaching the Remix Vite plugin ([#8740](https://github.com/remix-run/remix/pull/8740))
|
|
164
|
+
|
|
165
|
+
- Vite: Enable HMR for .md and .mdx files ([#8711](https://github.com/remix-run/remix/pull/8711))
|
|
166
|
+
|
|
167
|
+
- Updated dependencies:
|
|
168
|
+
- `@remix-run/server-runtime@2.7.0`
|
|
169
|
+
- `@remix-run/node@2.7.0`
|
|
170
|
+
|
|
171
|
+
## 2.6.0
|
|
172
|
+
|
|
173
|
+
### Minor Changes
|
|
174
|
+
|
|
175
|
+
- Add `future.v3_throwAbortReason` flag to throw `request.signal.reason` when a request is aborted instead of an `Error` such as `new Error("query() call aborted: GET /path")` ([#8251](https://github.com/remix-run/remix/pull/8251))
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- Vite: Add `manifest` option to Vite plugin to enable writing a `.remix/manifest.json` file to the build directory ([#8575](https://github.com/remix-run/remix/pull/8575))
|
|
180
|
+
|
|
181
|
+
**This is a breaking change for consumers of the Vite plugin's "server bundles" feature.**
|
|
182
|
+
|
|
183
|
+
The `build/server/bundles.json` file has been superseded by the more general `build/.remix/manifest.json`. While the old server bundles manifest was always written to disk when generating server bundles, the build manifest file must be explicitly enabled via the `manifest` option.
|
|
184
|
+
|
|
185
|
+
- Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
|
|
186
|
+
|
|
187
|
+
- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
|
|
188
|
+
|
|
189
|
+
- `--sourcemapClient`
|
|
190
|
+
|
|
191
|
+
- `--sourcemapClient=inline`
|
|
192
|
+
|
|
193
|
+
- `--sourcemapClient=hidden`
|
|
194
|
+
|
|
195
|
+
- `--sourcemapServer`
|
|
196
|
+
|
|
197
|
+
- `--sourcemapServer=inline`
|
|
198
|
+
|
|
199
|
+
- `--sourcemapServer=hidden`
|
|
200
|
+
|
|
201
|
+
See <https://vitejs.dev/config/build-options.html#build-sourcemap>
|
|
202
|
+
|
|
203
|
+
- Vite: Validate IDs returned from the `serverBundles` function to ensure they only contain alphanumeric characters, hyphens and underscores ([#8598](https://github.com/remix-run/remix/pull/8598))
|
|
204
|
+
|
|
205
|
+
- Vite: fix "could not fast refresh" false alarm ([#8580](https://github.com/remix-run/remix/pull/8580))
|
|
206
|
+
|
|
207
|
+
HMR is already functioning correctly but was incorrectly logging that it "could not fast refresh" on internal client routes.
|
|
208
|
+
Now internal client routes correctly register Remix exports like `meta` for fast refresh,
|
|
209
|
+
which removes the false alarm.
|
|
210
|
+
|
|
211
|
+
- Vite: Cloudflare Pages support ([#8531](https://github.com/remix-run/remix/pull/8531))
|
|
212
|
+
|
|
213
|
+
To get started with Cloudflare, you can use the \[`unstable-vite-cloudflare`]\[template-vite-cloudflare] template:
|
|
214
|
+
|
|
215
|
+
```shellscript nonumber
|
|
216
|
+
npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Or read the new docs at [Future > Vite > Cloudflare](https://remix.run/docs/en/main/future/vite#cloudflare) and
|
|
220
|
+
[Future > Vite > Migrating > Migrating Cloudflare Functions](https://remix.run/docs/en/main/future/vite#migrating-cloudflare-functions).
|
|
221
|
+
|
|
222
|
+
- Vite: Remove undocumented backwards compatibility layer for Vite v4 ([#8581](https://github.com/remix-run/remix/pull/8581))
|
|
223
|
+
|
|
224
|
+
- Vite: rely on Vite plugin ordering ([#8627](https://github.com/remix-run/remix/pull/8627))
|
|
225
|
+
|
|
226
|
+
**This is a breaking change for projects using the unstable Vite plugin.**
|
|
227
|
+
|
|
228
|
+
The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first.
|
|
229
|
+
For example, that means putting the MDX plugin _before_ the Remix plugin:
|
|
230
|
+
|
|
231
|
+
```diff
|
|
232
|
+
import mdx from "@mdx-js/rollup";
|
|
233
|
+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
|
234
|
+
import { defineConfig } from "vite";
|
|
235
|
+
|
|
236
|
+
export default defineConfig({
|
|
237
|
+
plugins: [
|
|
238
|
+
+ mdx(),
|
|
239
|
+
remix()
|
|
240
|
+
- mdx(),
|
|
241
|
+
],
|
|
242
|
+
});
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Previously, the Remix plugin misused `enforce: "post"` from Vite's plugin API to ensure that it ran last.
|
|
246
|
+
However, this caused other unforeseen issues.
|
|
247
|
+
Instead, we now rely on standard Vite semantics for plugin ordering.
|
|
248
|
+
|
|
249
|
+
The official [Vite React SWC plugin](https://github.com/vitejs/vite-plugin-react-swc/blob/main/src/index.ts#L97-L116) also relies on plugin ordering for MDX.
|
|
250
|
+
|
|
251
|
+
- Vite: Add `presets` option to ease integration with different platforms and tools. ([#8514](https://github.com/remix-run/remix/pull/8514))
|
|
252
|
+
|
|
253
|
+
- Vite: Remove interop with `<LiveReload />`, rely on `<Scripts />` instead ([#8636](https://github.com/remix-run/remix/pull/8636))
|
|
254
|
+
|
|
255
|
+
**This is a breaking change for projects using the unstable Vite plugin.**
|
|
256
|
+
|
|
257
|
+
Vite provides a robust client-side runtime for development features like HMR,
|
|
258
|
+
making the `<LiveReload />` component obsolete.
|
|
259
|
+
|
|
260
|
+
In fact, having a separate dev scripts component was causing issues with script execution order.
|
|
261
|
+
To work around this, the Remix Vite plugin used to override `<LiveReload />` into a bespoke
|
|
262
|
+
implementation that was compatible with Vite.
|
|
263
|
+
|
|
264
|
+
Instead of all this indirection, now the Remix Vite plugin instructs the `<Scripts />` component
|
|
265
|
+
to automatically include Vite's client-side runtime and other dev-only scripts.
|
|
266
|
+
|
|
267
|
+
```diff
|
|
268
|
+
import {
|
|
269
|
+
- LiveReload,
|
|
270
|
+
Outlet,
|
|
271
|
+
Scripts,
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export default function App() {
|
|
275
|
+
return (
|
|
276
|
+
<html>
|
|
277
|
+
<head>
|
|
278
|
+
</head>
|
|
279
|
+
<body>
|
|
280
|
+
<Outlet />
|
|
281
|
+
<Scripts />
|
|
282
|
+
- <LiveReload />
|
|
283
|
+
</body>
|
|
284
|
+
</html>
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- Vite: Add `buildEnd` hook ([#8620](https://github.com/remix-run/remix/pull/8620))
|
|
290
|
+
|
|
291
|
+
- Vite: add dev load context option to Cloudflare preset ([#8649](https://github.com/remix-run/remix/pull/8649))
|
|
292
|
+
|
|
293
|
+
- Vite: Add `mode` field into generated server build ([#8539](https://github.com/remix-run/remix/pull/8539))
|
|
294
|
+
|
|
295
|
+
- Vite: Only write Vite manifest files if `build.manifest` is enabled within the Vite config ([#8599](https://github.com/remix-run/remix/pull/8599))
|
|
296
|
+
|
|
297
|
+
**This is a breaking change for consumers of Vite's `manifest.json` files.**
|
|
298
|
+
|
|
299
|
+
To explicitly enable generation of Vite manifest files, you must set `build.manifest` to `true` in your Vite config.
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
export default defineConfig({
|
|
303
|
+
build: { manifest: true },
|
|
304
|
+
// ...
|
|
305
|
+
});
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
- Vite: reduce network calls for route modules during HMR ([#8591](https://github.com/remix-run/remix/pull/8591))
|
|
309
|
+
|
|
310
|
+
- Vite: Add new `buildDirectory` option with a default value of `"build"`. This replaces the old `assetsBuildDirectory` and `serverBuildDirectory` options which defaulted to `"build/client"` and `"build/server"` respectively. ([#8575](https://github.com/remix-run/remix/pull/8575))
|
|
311
|
+
|
|
312
|
+
**This is a breaking change for consumers of the Vite plugin that were using the `assetsBuildDirectory` and `serverBuildDirectory` options.**
|
|
313
|
+
|
|
314
|
+
The Remix Vite plugin now builds into a single directory containing `client` and `server` directories. If you've customized your build output directories, you'll need to migrate to the new `buildDirectory` option, e.g.
|
|
315
|
+
|
|
316
|
+
```diff
|
|
317
|
+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
|
318
|
+
import { defineConfig } from "vite";
|
|
319
|
+
|
|
320
|
+
export default defineConfig({
|
|
321
|
+
plugins: [
|
|
322
|
+
remix({
|
|
323
|
+
- serverBuildDirectory: "dist/server",
|
|
324
|
+
- assetsBuildDirectory: "dist/client",
|
|
325
|
+
+ buildDirectory: "dist",
|
|
326
|
+
})
|
|
327
|
+
],
|
|
328
|
+
});
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
- Vite: Remove `unstable` prefix from `serverBundles` option. ([#8596](https://github.com/remix-run/remix/pull/8596))
|
|
332
|
+
|
|
333
|
+
- Vite: Write Vite manifest files to `build/.vite` directory rather than being nested within `build/client` and `build/server` directories. ([#8599](https://github.com/remix-run/remix/pull/8599))
|
|
334
|
+
|
|
335
|
+
**This is a breaking change for consumers of Vite's `manifest.json` files.**
|
|
336
|
+
|
|
337
|
+
Vite manifest files are now written to the Remix build directory. Since all Vite manifests are now in the same directory, they're no longer named `manifest.json`. Instead, they're named `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`, or `build/.vite/server-{BUNDLE_ID}-manifest.json` when using server bundles.
|
|
338
|
+
|
|
339
|
+
- Updated dependencies:
|
|
340
|
+
- `@remix-run/server-runtime@2.6.0`
|
|
341
|
+
- `@remix-run/node@2.6.0`
|
|
342
|
+
|
|
343
|
+
## 2.5.1
|
|
344
|
+
|
|
345
|
+
### Patch Changes
|
|
346
|
+
|
|
347
|
+
- Add `isSpaMode` to `@remix-run/dev/server-build` virtual module ([#8492](https://github.com/remix-run/remix/pull/8492))
|
|
348
|
+
- Automatically prepend `<!DOCTYPE html>` if not present to fix quirks mode warnings for SPA template ([#8495](https://github.com/remix-run/remix/pull/8495))
|
|
349
|
+
- Vite: Errors for server-only code point to new docs ([#8488](https://github.com/remix-run/remix/pull/8488))
|
|
350
|
+
- Vite: Fix HMR race condition when reading changed file contents ([#8479](https://github.com/remix-run/remix/pull/8479))
|
|
351
|
+
- Vite: Tree-shake unused route exports in the client build ([#8468](https://github.com/remix-run/remix/pull/8468))
|
|
352
|
+
- Vite: Performance profiling ([#8493](https://github.com/remix-run/remix/pull/8493))
|
|
353
|
+
- Run `remix vite:build --profile` to generate a `.cpuprofile` that can be shared or uploaded to speedscope.app
|
|
354
|
+
- In dev, press `p + enter` to start a new profiling session or stop the current session
|
|
355
|
+
- If you need to profile dev server startup, run `remix vite:dev --profile` to initialize the dev server with a running profiling session
|
|
356
|
+
- For more, see the new docs: Vite > Performance
|
|
357
|
+
- Vite: Improve performance of dev server requests by invalidating Remix's virtual modules on relevant file changes rather than on every request ([#8164](https://github.com/remix-run/remix/pull/8164))
|
|
358
|
+
- Updated dependencies:
|
|
359
|
+
- `@remix-run/node@2.5.1`
|
|
360
|
+
- `@remix-run/server-runtime@2.5.1`
|
|
361
|
+
|
|
362
|
+
## 2.5.0
|
|
363
|
+
|
|
364
|
+
### Minor Changes
|
|
365
|
+
|
|
366
|
+
- Add unstable support for "SPA Mode" ([#8457](https://github.com/remix-run/remix/pull/8457))
|
|
367
|
+
|
|
368
|
+
You can opt into SPA Mode by setting `unstable_ssr: false` in your Remix Vite plugin config:
|
|
369
|
+
|
|
370
|
+
```js
|
|
371
|
+
// vite.config.ts
|
|
372
|
+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
|
373
|
+
import { defineConfig } from "vite";
|
|
374
|
+
|
|
375
|
+
export default defineConfig({
|
|
376
|
+
plugins: [remix({ unstable_ssr: false })],
|
|
377
|
+
});
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:
|
|
381
|
+
|
|
382
|
+
```sh
|
|
383
|
+
remix vite:dev
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Building in SPA Mode will generate an `index.html` file in your client assets directory:
|
|
387
|
+
|
|
388
|
+
```sh
|
|
389
|
+
remix vite:build
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
To run your SPA, you serve your client assets directory via an HTTP server:
|
|
393
|
+
|
|
394
|
+
```sh
|
|
395
|
+
npx http-server build/client
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
For more information, please refer to the [SPA Mode docs](https://remix.run/future/spa-mode).
|
|
399
|
+
|
|
400
|
+
- Add `unstable_serverBundles` option to Vite plugin to support splitting server code into multiple request handlers. ([#8332](https://github.com/remix-run/remix/pull/8332))
|
|
401
|
+
|
|
402
|
+
This is an advanced feature designed for hosting provider integrations. When compiling your app into multiple server bundles, there will need to be a custom routing layer in front of your app directing requests to the correct bundle. This feature is currently unstable and only designed to gather early feedback.
|
|
403
|
+
|
|
404
|
+
**Example usage:**
|
|
405
|
+
|
|
406
|
+
```ts
|
|
407
|
+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
|
408
|
+
import { defineConfig } from "vite";
|
|
409
|
+
|
|
410
|
+
export default defineConfig({
|
|
411
|
+
plugins: [
|
|
412
|
+
remix({
|
|
413
|
+
unstable_serverBundles: ({ branch }) => {
|
|
414
|
+
const isAuthenticatedRoute = branch.some(
|
|
415
|
+
(route) => route.id === "routes/_authenticated"
|
|
416
|
+
);
|
|
417
|
+
|
|
418
|
+
return isAuthenticatedRoute ? "authenticated" : "unauthenticated";
|
|
419
|
+
},
|
|
420
|
+
}),
|
|
421
|
+
],
|
|
422
|
+
});
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Patch Changes
|
|
426
|
+
|
|
427
|
+
- Fix issue with `isbot` v4 released on 1/1/2024 ([#8415](https://github.com/remix-run/remix/pull/8415))
|
|
428
|
+
|
|
429
|
+
- `remix dev` will now add `"isbot": "^4"` to `package.json` instead of using `latest`
|
|
430
|
+
- Update built-in `entry.server` files to work with both `isbot@3` and `isbot@4` for backwards-compatibility with Remix apps that have pinned `isbot` to v3
|
|
431
|
+
- Templates are updated to use `isbot@4` moving forward via `create-remix`
|
|
432
|
+
|
|
433
|
+
- Vite: Fix HMR issues when altering exports for non-rendered routes ([#8157](https://github.com/remix-run/remix/pull/8157))
|
|
434
|
+
|
|
435
|
+
- Vite: Default `NODE_ENV` to `"production"` when running `remix vite:build` command ([#8405](https://github.com/remix-run/remix/pull/8405))
|
|
436
|
+
|
|
437
|
+
- Vite: Remove Vite plugin config option `serverBuildPath` in favor of separate `serverBuildDirectory` and `serverBuildFile` options ([#8332](https://github.com/remix-run/remix/pull/8332))
|
|
438
|
+
|
|
439
|
+
- Vite: Loosen strict route exports restriction, reinstating support for non-Remix route exports ([#8420](https://github.com/remix-run/remix/pull/8420))
|
|
440
|
+
|
|
441
|
+
- Updated dependencies:
|
|
442
|
+
- `@remix-run/server-runtime@2.5.0`
|
|
443
|
+
- `@remix-run/node@2.5.0`
|
|
444
|
+
|
|
445
|
+
## 2.4.1
|
|
446
|
+
|
|
447
|
+
### Patch Changes
|
|
448
|
+
|
|
449
|
+
- Vite: Error messages when `.server` files are referenced by client ([#8267](https://github.com/remix-run/remix/pull/8267))
|
|
450
|
+
|
|
451
|
+
- Previously, referencing a `.server` module from client code resulted in an error message like:
|
|
452
|
+
- `The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'`
|
|
453
|
+
- This was confusing because `answer.server.ts` _does_ provide the `isDateType` export, but Remix was replacing `.server` modules with empty modules (`export {}`) for the client build
|
|
454
|
+
- Now, Remix explicitly fails at compile time when a `.server` module is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route module
|
|
455
|
+
- The error messages also include links to relevant documentation
|
|
456
|
+
|
|
457
|
+
- Remove `unstable_viteServerBuildModuleId` in favor of manually referencing virtual module name `"virtual:remix/server-build"`. ([#8264](https://github.com/remix-run/remix/pull/8264))
|
|
458
|
+
|
|
459
|
+
**This is a breaking change for projects using the unstable Vite plugin with a custom server.**
|
|
460
|
+
|
|
461
|
+
This change was made to avoid issues where `@remix-run/dev` could be inadvertently required in your server's production dependencies.
|
|
462
|
+
|
|
463
|
+
Instead, you should manually write the virtual module name `"virtual:remix/server-build"` when calling `ssrLoadModule` in development.
|
|
464
|
+
|
|
465
|
+
```diff
|
|
466
|
+
-import { unstable_viteServerBuildModuleId } from "@remix-run/dev";
|
|
467
|
+
|
|
468
|
+
// ...
|
|
469
|
+
|
|
470
|
+
app.all(
|
|
471
|
+
"*",
|
|
472
|
+
createRequestHandler({
|
|
473
|
+
build: vite
|
|
474
|
+
- ? () => vite.ssrLoadModule(unstable_viteServerBuildModuleId)
|
|
475
|
+
+ ? () => vite.ssrLoadModule("virtual:remix/server-build")
|
|
476
|
+
: await import("./build/server/index.js"),
|
|
477
|
+
})
|
|
478
|
+
);
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
- Vite: Fix errors for non-existent `index.html` importer ([#8353](https://github.com/remix-run/remix/pull/8353))
|
|
482
|
+
|
|
483
|
+
- Add `vite:dev` and `vite:build` commands to the Remix CLI. ([#8211](https://github.com/remix-run/remix/pull/8211))
|
|
484
|
+
|
|
485
|
+
In order to handle upcoming Remix features where your plugin options can impact the number of Vite builds required, you should now run your Vite `dev` and `build` processes via the Remix CLI.
|
|
486
|
+
|
|
487
|
+
```diff
|
|
488
|
+
{
|
|
489
|
+
"scripts": {
|
|
490
|
+
- "dev": "vite dev",
|
|
491
|
+
- "build": "vite build && vite build --ssr"
|
|
492
|
+
+ "dev": "remix vite:dev",
|
|
493
|
+
+ "build": "remix vite:build"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
- Vite: Preserve names for exports from `.client` modules ([#8200](https://github.com/remix-run/remix/pull/8200))
|
|
499
|
+
|
|
500
|
+
Unlike `.server` modules, the main idea is not to prevent code from leaking into the server build
|
|
501
|
+
since the client build is already public. Rather, the goal is to isolate the SSR render from client-only code.
|
|
502
|
+
Routes need to import code from `.client` modules without compilation failing and then rely on runtime checks
|
|
503
|
+
or otherwise ensure that execution only happens within a client-only context (e.g. event handlers, `useEffect`).
|
|
504
|
+
|
|
505
|
+
Replacing `.client` modules with empty modules would cause the build to fail as ESM named imports are statically analyzed.
|
|
506
|
+
So instead, we preserve the named export but replace each exported value with `undefined`.
|
|
507
|
+
That way, the import is valid at build time and standard runtime checks can be used to determine if the
|
|
508
|
+
code is running on the server or client.
|
|
509
|
+
|
|
510
|
+
- Disable watch mode in Vite child compiler during build ([#8342](https://github.com/remix-run/remix/pull/8342))
|
|
511
|
+
|
|
512
|
+
- Vite: Show warning when source maps are enabled in production build ([#8222](https://github.com/remix-run/remix/pull/8222))
|
|
513
|
+
|
|
514
|
+
- Updated dependencies:
|
|
515
|
+
- `@remix-run/server-runtime@2.4.1`
|
|
516
|
+
- `@remix-run/node@2.4.1`
|
|
517
|
+
|
|
518
|
+
## 2.4.0
|
|
519
|
+
|
|
520
|
+
### Minor Changes
|
|
521
|
+
|
|
522
|
+
- Vite: exclude modules within `.server` directories from client build ([#8154](https://github.com/remix-run/remix/pull/8154))
|
|
523
|
+
|
|
524
|
+
- 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))
|
|
525
|
+
|
|
526
|
+
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:
|
|
527
|
+
|
|
528
|
+
- Leveraging a data source local to the browser (i.e., `localStorage`)
|
|
529
|
+
- Managing a client-side cache of server data (like `IndexedDB`)
|
|
530
|
+
- Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
|
|
531
|
+
- Migrating a React Router SPA to a Remix application
|
|
532
|
+
|
|
533
|
+
By default, `clientLoader` will not run on hydration, and will only run on subsequent client side navigations.
|
|
534
|
+
|
|
535
|
+
If you wish to run your client loader on hydration, you can set `clientLoader.hydrate=true` to force Remix to execute it on initial page load. Keep in mind that Remix will still SSR your route component so you should ensure that there is no new _required_ data being added by your `clientLoader`.
|
|
536
|
+
|
|
537
|
+
If your `clientLoader` needs to run on hydration and adds data you require to render the route component, you can export a `HydrateFallback` component that will render during SSR, and then your route component will not render until the `clientLoader` has executed on hydration.
|
|
538
|
+
|
|
539
|
+
`clientAction` is simpler than `clientLoader` because it has no hydration use-cases. `clientAction` will only run on client-side navigations.
|
|
540
|
+
|
|
541
|
+
For more information, please refer to the [`clientLoader`](https://remix.run/route/client-loader) and [`clientAction`](https://remix.run/route/client-action) documentation.
|
|
542
|
+
|
|
543
|
+
- Vite: Strict route exports ([#8171](https://github.com/remix-run/remix/pull/8171))
|
|
544
|
+
|
|
545
|
+
With Vite, Remix gets stricter about which exports are allowed from your route modules.
|
|
546
|
+
Previously, the Remix compiler would allow any export from routes.
|
|
547
|
+
While this was convenient, it was also a common source of bugs that were hard to track down because they only surfaced at runtime.
|
|
548
|
+
|
|
549
|
+
For more, see <https://remix.run/docs/en/main/future/vite#strict-route-exports>
|
|
550
|
+
|
|
551
|
+
- Add a new `future.v3_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. For more information, please see the React Router [`6.21.0` Release Notes](https://github.com/remix-run/react-router/blob/release-next/CHANGELOG.md#futurev7_relativesplatpath) and the [`useResolvedPath` docs](https://remix.run/hooks/use-resolved-path#splat-paths). ([#8216](https://github.com/remix-run/remix/pull/8216))
|
|
552
|
+
|
|
553
|
+
### Patch Changes
|
|
554
|
+
|
|
555
|
+
- Upgrade Vite peer dependency range to v5 ([#8172](https://github.com/remix-run/remix/pull/8172))
|
|
556
|
+
|
|
557
|
+
- Support HMR for routes with `handle` export in Vite dev ([#8022](https://github.com/remix-run/remix/pull/8022))
|
|
558
|
+
|
|
559
|
+
- Fix flash of unstyled content for non-Express custom servers in Vite dev ([#8076](https://github.com/remix-run/remix/pull/8076))
|
|
560
|
+
|
|
561
|
+
- Bundle CSS imported in client entry file in Vite plugin ([#8143](https://github.com/remix-run/remix/pull/8143))
|
|
562
|
+
|
|
563
|
+
- Change Vite build output paths to fix a conflict between how Vite and the Remix compiler each manage the `public` directory. ([#8077](https://github.com/remix-run/remix/pull/8077))
|
|
564
|
+
|
|
565
|
+
**This is a breaking change for projects using the unstable Vite plugin.**
|
|
566
|
+
|
|
567
|
+
The server is now compiled into `build/server` rather than `build`, and the client is now compiled into `build/client` rather than `public`.
|
|
568
|
+
|
|
569
|
+
For more information on the changes and guidance on how to migrate your project, refer to the updated [Remix Vite documentation](https://remix.run/docs/en/main/future/vite).
|
|
570
|
+
|
|
571
|
+
- Remove undocumented `legacyCssImports` option from Vite plugin due to issues with `?url` imports of CSS files not being processed correctly in Vite ([#8096](https://github.com/remix-run/remix/pull/8096))
|
|
572
|
+
|
|
573
|
+
- Vite: fix access to default `entry.{client,server}.tsx` within pnpm workspace on Windows ([#8057](https://github.com/remix-run/remix/pull/8057))
|
|
574
|
+
|
|
575
|
+
- Remove `unstable_createViteServer` and `unstable_loadViteServerBuild` which were only minimal wrappers around Vite's `createServer` and `ssrLoadModule` functions when using a custom server. ([#8120](https://github.com/remix-run/remix/pull/8120))
|
|
576
|
+
|
|
577
|
+
**This is a breaking change for projects using the unstable Vite plugin with a custom server.**
|
|
578
|
+
|
|
579
|
+
Instead, we now provide `unstable_viteServerBuildModuleId` so that custom servers interact with Vite directly rather than via Remix APIs, for example:
|
|
580
|
+
|
|
581
|
+
```diff
|
|
582
|
+
-import {
|
|
583
|
+
- unstable_createViteServer,
|
|
584
|
+
- unstable_loadViteServerBuild,
|
|
585
|
+
-} from "@remix-run/dev";
|
|
586
|
+
+import { unstable_viteServerBuildModuleId } from "@remix-run/dev";
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
Creating the Vite server in middleware mode:
|
|
590
|
+
|
|
591
|
+
```diff
|
|
592
|
+
const vite =
|
|
593
|
+
process.env.NODE_ENV === "production"
|
|
594
|
+
? undefined
|
|
595
|
+
- : await unstable_createViteServer();
|
|
596
|
+
+ : await import("vite").then(({ createServer }) =>
|
|
597
|
+
+ createServer({
|
|
598
|
+
+ server: {
|
|
599
|
+
+ middlewareMode: true,
|
|
600
|
+
+ },
|
|
601
|
+
+ })
|
|
602
|
+
+ );
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
Loading the Vite server build in the request handler:
|
|
606
|
+
|
|
607
|
+
```diff
|
|
608
|
+
app.all(
|
|
609
|
+
"*",
|
|
610
|
+
createRequestHandler({
|
|
611
|
+
build: vite
|
|
612
|
+
- ? () => unstable_loadViteServerBuild(vite)
|
|
613
|
+
+ ? () => vite.ssrLoadModule(unstable_viteServerBuildModuleId)
|
|
614
|
+
: await import("./build/server/index.js"),
|
|
615
|
+
})
|
|
616
|
+
);
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
- Pass request handler errors to `vite.ssrFixStacktrace` in Vite dev to ensure stack traces correctly map to the original source code ([#8066](https://github.com/remix-run/remix/pull/8066))
|
|
620
|
+
|
|
621
|
+
- Vite: Preserve names for exports from .client imports ([#8200](https://github.com/remix-run/remix/pull/8200))
|
|
622
|
+
|
|
623
|
+
Unlike `.server` modules, the main idea is not to prevent code from leaking into the server build
|
|
624
|
+
since the client build is already public. Rather, the goal is to isolate the SSR render from client-only code.
|
|
625
|
+
Routes need to import code from `.client` modules without compilation failing and then rely on runtime checks
|
|
626
|
+
to determine if the code is running on the server or client.
|
|
627
|
+
|
|
628
|
+
Replacing `.client` modules with empty modules would cause the build to fail as ESM named imports are statically analyzed.
|
|
629
|
+
So instead, we preserve the named export but replace each exported value with an empty object.
|
|
630
|
+
That way, the import is valid at build time and the standard runtime checks can be used to determine if then
|
|
631
|
+
code is running on the server or client.
|
|
632
|
+
|
|
633
|
+
- Add `@remix-run/node` to Vite's `optimizeDeps.include` array ([#8177](https://github.com/remix-run/remix/pull/8177))
|
|
634
|
+
|
|
635
|
+
- Improve Vite plugin performance ([#8121](https://github.com/remix-run/remix/pull/8121))
|
|
636
|
+
|
|
637
|
+
- Parallelize detection of route module exports
|
|
638
|
+
- Disable `server.preTransformRequests` in Vite child compiler since it's only used to process route modules
|
|
639
|
+
|
|
640
|
+
- Remove automatic global Node polyfill installation from the built-in Vite dev server and instead allow explicit opt-in. ([#8119](https://github.com/remix-run/remix/pull/8119))
|
|
641
|
+
|
|
642
|
+
**This is a breaking change for projects using the unstable Vite plugin without a custom server.**
|
|
643
|
+
|
|
644
|
+
If you're not using a custom server, you should call `installGlobals` in your Vite config instead.
|
|
645
|
+
|
|
646
|
+
```diff
|
|
647
|
+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
|
648
|
+
+import { installGlobals } from "@remix-run/node";
|
|
649
|
+
import { defineConfig } from "vite";
|
|
650
|
+
|
|
651
|
+
+installGlobals();
|
|
652
|
+
|
|
653
|
+
export default defineConfig({
|
|
654
|
+
plugins: [remix()],
|
|
655
|
+
});
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
- Vite: Errors at build-time when client imports .server default export ([#8184](https://github.com/remix-run/remix/pull/8184))
|
|
659
|
+
|
|
660
|
+
Remix already stripped .server file code before ensuring that server code never makes it into the client.
|
|
661
|
+
That results in errors when client code tries to import server code, which is exactly what we want!
|
|
662
|
+
But those errors were happening at runtime for default imports.
|
|
663
|
+
A better experience is to have those errors happen at build-time so that you guarantee that your users won't hit them.
|
|
664
|
+
|
|
665
|
+
- Fix `request instanceof Request` checks when using Vite dev server ([#8062](https://github.com/remix-run/remix/pull/8062))
|
|
666
|
+
|
|
667
|
+
- Updated dependencies:
|
|
668
|
+
- `@remix-run/server-runtime@2.4.0`
|
|
669
|
+
- `@remix-run/node@2.4.0`
|
|
670
|
+
|
|
671
|
+
## 2.3.1
|
|
672
|
+
|
|
673
|
+
### Patch Changes
|
|
674
|
+
|
|
675
|
+
- Support `nonce` prop on `LiveReload` component in Vite dev ([#8014](https://github.com/remix-run/remix/pull/8014))
|
|
676
|
+
- Ensure code-split JS files in the server build's assets directory aren't cleaned up after Vite build ([#8042](https://github.com/remix-run/remix/pull/8042))
|
|
677
|
+
- Fix redundant copying of assets from `public` directory in Vite build ([#8039](https://github.com/remix-run/remix/pull/8039))
|
|
678
|
+
- This ensures that static assets aren't duplicated in the server build directory
|
|
679
|
+
- This also fixes an issue where the build would break if `assetsBuildDirectory` was deeply nested within the `public` directory
|
|
680
|
+
- Updated dependencies:
|
|
681
|
+
- `@remix-run/node@2.3.1`
|
|
682
|
+
- `@remix-run/server-runtime@2.3.1`
|
|
683
|
+
|
|
684
|
+
## 2.3.0
|
|
685
|
+
|
|
686
|
+
### Patch Changes
|
|
687
|
+
|
|
688
|
+
- Support rendering of `LiveReload` component after `Scripts` in Vite dev ([#7919](https://github.com/remix-run/remix/pull/7919))
|
|
689
|
+
- fix(vite): fix "react-refresh/babel" resolution for custom server with pnpm ([#7904](https://github.com/remix-run/remix/pull/7904))
|
|
690
|
+
- Support JSX usage in `.jsx` files without manual `React` import in Vite ([#7888](https://github.com/remix-run/remix/pull/7888))
|
|
691
|
+
- Support optional rendering of `LiveReload` component in Vite dev ([#7919](https://github.com/remix-run/remix/pull/7919))
|
|
692
|
+
- Fix Vite production builds when plugins that have different local state between `development` and `production` modes are present, e.g. `@mdx-js/rollup`. ([#7911](https://github.com/remix-run/remix/pull/7911))
|
|
693
|
+
- Cache resolution of Remix Vite plugin options ([#7908](https://github.com/remix-run/remix/pull/7908))
|
|
694
|
+
- Support Vite 5 ([#7846](https://github.com/remix-run/remix/pull/7846))
|
|
695
|
+
- Allow `process.env.NODE_ENV` values other than `"development"` in Vite dev ([#7980](https://github.com/remix-run/remix/pull/7980))
|
|
696
|
+
- Attach CSS from shared chunks to routes in Vite build ([#7952](https://github.com/remix-run/remix/pull/7952))
|
|
697
|
+
- fix(vite): Let Vite handle serving files outside of project root via `/@fs` ([#7913](https://github.com/remix-run/remix/pull/7913))
|
|
698
|
+
- This fixes errors when using default client entry or server entry in a pnpm project where those files may be outside of the project root, but within the workspace root.
|
|
699
|
+
- By default, Vite prevents access to files outside the workspace root (when using workspaces) or outside of the project root (when not using workspaces) unless user explicitly opts into it via Vite's `server.fs.allow`.
|
|
700
|
+
- Improve performance of LiveReload proxy in Vite dev ([#7883](https://github.com/remix-run/remix/pull/7883))
|
|
701
|
+
- fix(vite): deduplicate `@remix-run/react` ([#7926](https://github.com/remix-run/remix/pull/7926))
|
|
702
|
+
- Pre-bundle Remix dependencies to avoid Remix router duplicates.
|
|
703
|
+
- Our remix-react-proxy plugin does not process default client and
|
|
704
|
+
- server entry files since those come from within `node_modules`.
|
|
705
|
+
- That means that before Vite pre-bundles dependencies (e.g. first time dev server is run) mismatching Remix routers cause `Error: You must render this element inside a <Remix> element`.
|
|
706
|
+
- Fix React Fast Refresh error on load when using `defer` in Vite dev server ([#7842](https://github.com/remix-run/remix/pull/7842))
|
|
707
|
+
- Handle multiple "Set-Cookie" headers in Vite dev server ([#7843](https://github.com/remix-run/remix/pull/7843))
|
|
708
|
+
- Fix flash of unstyled content on initial page load in Vite dev when using a custom Express server ([#7937](https://github.com/remix-run/remix/pull/7937))
|
|
709
|
+
- Emit assets that were only referenced in the server build into the client assets directory in Vite build ([#7892](https://github.com/remix-run/remix/pull/7892), cherry-picked in [`8cd31d65`](https://github.com/remix-run/remix/commit/8cd31d6543ef4c765220fc64dca9bcc9c61ee9eb))
|
|
710
|
+
- Populate `process.env` from `.env` files on the server in Vite dev ([#7958](https://github.com/remix-run/remix/pull/7958))
|
|
711
|
+
- Fix `FutureConfig` type ([#7895](https://github.com/remix-run/remix/pull/7895))
|
|
712
|
+
- Updated dependencies:
|
|
713
|
+
- `@remix-run/server-runtime@2.3.0`
|
|
714
|
+
- `@remix-run/node@2.3.0`
|
|
715
|
+
|
|
716
|
+
## 2.2.0
|
|
717
|
+
|
|
718
|
+
### Minor Changes
|
|
719
|
+
|
|
720
|
+
- Unstable Vite support for Node-based Remix apps ([#7590](https://github.com/remix-run/remix/pull/7590))
|
|
721
|
+
- `remix build` 👉 `vite build && vite build --ssr`
|
|
722
|
+
- `remix dev` 👉 `vite dev`
|
|
723
|
+
- Other runtimes (e.g. Deno, Cloudflare) not yet supported.
|
|
724
|
+
- See "Future > Vite" in the Remix Docs for details
|
|
725
|
+
- Add a new `future.v3_fetcherPersist` flag to change the persistence behavior of fetchers. Instead of being immediately cleaned up when unmounted in the UI, fetchers will persist until they return to an `idle` state ([RFC](https://github.com/remix-run/remix/discussions/7698)) ([#7704](https://github.com/remix-run/remix/pull/7704))
|
|
726
|
+
- For more details, please refer to the [React Router 6.18.0](https://github.com/remix-run/react-router/releases/tag/react-router%406.18.0) release notes
|
|
727
|
+
|
|
728
|
+
### Patch Changes
|
|
729
|
+
|
|
730
|
+
- Updated dependencies:
|
|
731
|
+
- `@remix-run/server-runtime@2.2.0`
|
|
732
|
+
- `@remix-run/node@2.2.0`
|
|
733
|
+
|
|
734
|
+
## 2.1.0
|
|
735
|
+
|
|
736
|
+
### Patch Changes
|
|
737
|
+
|
|
738
|
+
- Sourcemap takes into account special chars in output file ([#7574](https://github.com/remix-run/remix/pull/7574))
|
|
739
|
+
- Updated dependencies:
|
|
740
|
+
- `@remix-run/server-runtime@2.1.0`
|
|
741
|
+
|
|
742
|
+
## 2.0.1
|
|
743
|
+
|
|
744
|
+
### Patch Changes
|
|
745
|
+
|
|
746
|
+
- Fix types for MDX files when using pnpm ([#7491](https://github.com/remix-run/remix/pull/7491))
|
|
747
|
+
- Update `getDependenciesToBundle` to handle ESM packages without main exports ([#7272](https://github.com/remix-run/remix/pull/7272))
|
|
748
|
+
- Note that these packages must expose `package.json` in their `exports` field so that their path can be resolved
|
|
749
|
+
- Fix server builds where `serverBuildPath` extension is `.cjs` ([#7180](https://github.com/remix-run/remix/pull/7180))
|
|
750
|
+
- Updated dependencies:
|
|
751
|
+
- `@remix-run/server-runtime@2.0.1`
|
|
752
|
+
|
|
753
|
+
## 2.0.0
|
|
754
|
+
|
|
755
|
+
### Major Changes
|
|
756
|
+
|
|
757
|
+
- The `create-remix` CLI has been rewritten to feature a cleaner interface, Git repo initialization and optional `remix.init` script execution. The interactive template prompt and official Remix stack/template shorthands have also been removed so that community/third-party templates are now on a more equal footing. ([#6887](https://github.com/remix-run/remix/pull/6887))
|
|
758
|
+
- The code for `create-remix` has been moved out of the Remix CLI since it's not intended for use within an existing Remix application
|
|
759
|
+
- This means that the `remix create` command is no longer available.
|
|
760
|
+
- Enable built-in PostCSS and Tailwind support by default. ([#6909](https://github.com/remix-run/remix/pull/6909))
|
|
761
|
+
- These tools are now automatically used within the Remix compiler if PostCSS and/or Tailwind configuration files are present in your project.
|
|
762
|
+
- If you have a custom PostCSS and/or Tailwind setup outside of Remix, you can disable these features in your `remix.config.js` via the `postcss:false` and/or `tailwind:false` flags
|
|
763
|
+
- Drop React 17 support ([#7121](https://github.com/remix-run/remix/pull/7121))
|
|
764
|
+
- Require Node >=18.0.0 ([#6939](https://github.com/remix-run/remix/pull/6939))
|
|
765
|
+
- Compile server build to Node 18 ([#7292](https://github.com/remix-run/remix/pull/7292))
|
|
766
|
+
- This allows features like top-level `await` to be used within a Remix app
|
|
767
|
+
- Remove default Node.js polyfills - you must now opt-into polyfills via the [`serverNodeBuiltinsPolyfill`](https://remix.run/docs/en/2.0.0/start/v2#servernodebuiltinspolyfill) and [`browserNodeBuiltinsPolyfill`](https://remix.run/docs/en/2.0.0/start/v2#browsernodebuiltinspolyfill) configs ([#7269](https://github.com/remix-run/remix/pull/7269))
|
|
768
|
+
- Remove `v2_errorBoundary` flag and `CatchBoundary` implementation ([#6906](https://github.com/remix-run/remix/pull/6906))
|
|
769
|
+
- Remove `v2_normalizeFormMethod` future flag - all `formMethod` values will be normalized in v2 ([#6875](https://github.com/remix-run/remix/pull/6875))
|
|
770
|
+
- Remove `v2_routeConvention` flag - the flat route file convention is now standard ([#6969](https://github.com/remix-run/remix/pull/6969))
|
|
771
|
+
- Remove `v2_headers` flag - it is now the default behavior to use the deepest `headers` function in the route tree ([#6979](https://github.com/remix-run/remix/pull/6979))
|
|
772
|
+
- The route `meta` API now defaults to the new "V2 Meta" API ([#6958](https://github.com/remix-run/remix/pull/6958))
|
|
773
|
+
- Please refer to the ([docs](https://remix.run/docs/en/2.0.0/route/meta) and [Preparing for V2](https://remix.run/docs/en/2.0.0/start/v2#route-meta) guide for more information.
|
|
774
|
+
- Default to `serverModuleFormat: "esm"` and update `remix-serve` to use dynamic import to support ESM and CJS build outputs ([#6949](https://github.com/remix-run/remix/pull/6949))
|
|
775
|
+
- Remove `serverBuildTarget` config option ([#6896](https://github.com/remix-run/remix/pull/6896))
|
|
776
|
+
- Remove deprecated `REMIX_DEV_HTTP_ORIGIN` env var - use `REMIX_DEV_ORIGIN` instead ([#6963](https://github.com/remix-run/remix/pull/6963))
|
|
777
|
+
- Remove `devServerBroadcastDelay` config option ([#7063](https://github.com/remix-run/remix/pull/7063))
|
|
778
|
+
- Remove deprecated `devServerPort` option - use `--port` / `dev.port` instead ([#7078](https://github.com/remix-run/remix/pull/7078))
|
|
779
|
+
- Remove deprecated `REMIX_DEV_SERVER_WS_PORT` env var - use `remix dev`'s '`--port` / `port` option instead ([#6965](https://github.com/remix-run/remix/pull/6965))
|
|
780
|
+
- Stop passing `isTypeScript` to `remix.init` script ([#7099](https://github.com/remix-run/remix/pull/7099))
|
|
781
|
+
- Remove `replace-remix-magic-imports` codemod ([#6899](https://github.com/remix-run/remix/pull/6899))
|
|
782
|
+
- Remove deprecated `--no-restart`/`restart` cli args/flags - use `--manual`/`manual` instead ([#6962](https://github.com/remix-run/remix/pull/6962))
|
|
783
|
+
- Remove deprecated `--scheme`/`scheme` and `--host`/`host` cli args/flags - use `REMIX_DEV_ORIGIN` instead ([#6962](https://github.com/remix-run/remix/pull/6962))
|
|
784
|
+
- Promote the `future.v2_dev` flag in `remix.config.js` to a root level `dev` config ([#7002](https://github.com/remix-run/remix/pull/7002))
|
|
785
|
+
- Remove `browserBuildDirectory` config option ([#6900](https://github.com/remix-run/remix/pull/6900))
|
|
786
|
+
- Remove `serverBuildDirectory` config option (\[#6897]\(<https://github.com/remix-run/remix/pull/-> Remove `codemod` command ([#6918](https://github.com/remix-run/remix/pull/6918))
|
|
787
|
+
6897\))
|
|
788
|
+
- Removed support for "magic exports" from the `remix` package. This package can be removed from your `package.json` and you should update all imports to use the source `@remix-run/*` packages: ([#6895](https://github.com/remix-run/remix/pull/6895))
|
|
789
|
+
|
|
790
|
+
```diff
|
|
791
|
+
- import type { ActionArgs } from "remix";
|
|
792
|
+
- import { json, useLoaderData } from "remix";
|
|
793
|
+
+ import type { ActionArgs } from "@remix-run/node";
|
|
794
|
+
+ import { json } from "@remix-run/node";
|
|
795
|
+
+ import { useLoaderData } from "@remix-run/react";
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
### Minor Changes
|
|
799
|
+
|
|
800
|
+
- Warn users about obsolete future flags in `remix.config.js` ([#7048](https://github.com/remix-run/remix/pull/7048))
|
|
801
|
+
- Detect built mode via `build.mode` ([#6964](https://github.com/remix-run/remix/pull/6964))
|
|
802
|
+
- Prevents mode mismatch between built Remix server entry and user-land server
|
|
803
|
+
- Additionally, all runtimes (including non-Node runtimes) can use `build.mode` to determine if HMR should be performed
|
|
804
|
+
- Support `bun` package manager ([#7074](https://github.com/remix-run/remix/pull/7074))
|
|
805
|
+
- The `serverNodeBuiltinsPolyfill` option (along with the newly added `browserNodeBuiltinsPolyfill`) now supports defining global polyfills in addition to module polyfills ([#7269](https://github.com/remix-run/remix/pull/7269))
|
|
806
|
+
|
|
807
|
+
- For example, to polyfill Node's `Buffer` global:
|
|
808
|
+
|
|
809
|
+
```js
|
|
810
|
+
module.exports = {
|
|
811
|
+
serverNodeBuiltinsPolyfill: {
|
|
812
|
+
globals: {
|
|
813
|
+
Buffer: true,
|
|
814
|
+
},
|
|
815
|
+
// You'll probably need to polyfill the "buffer" module
|
|
816
|
+
// too since the global polyfill imports this:
|
|
817
|
+
modules: {
|
|
818
|
+
buffer: true,
|
|
819
|
+
},
|
|
820
|
+
},
|
|
821
|
+
};
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
### Patch Changes
|
|
825
|
+
|
|
826
|
+
- Fix importing of PNGs, SVGs, and other assets from packages in `node_modules` ([#6813](https://github.com/remix-run/remix/pull/6813), [#7182](https://github.com/remix-run/remix/pull/7182))
|
|
827
|
+
|
|
828
|
+
- Decouple the `@remix-run/dev` package from the contents of the `@remix-run/css-bundle` package. ([#6982](https://github.com/remix-run/remix/pull/6982))
|
|
829
|
+
|
|
830
|
+
- The contents of the `@remix-run/css-bundle` package are now entirely managed by the Remix compiler
|
|
831
|
+
- Even though it's still recommended that your Remix dependencies all share the same version, this change ensures that there are no runtime errors when upgrading `@remix-run/dev` without upgrading `@remix-run/css-bundle`
|
|
832
|
+
|
|
833
|
+
- Allow non-development modes for `remix watch` ([#7117](https://github.com/remix-run/remix/pull/7117))
|
|
834
|
+
|
|
835
|
+
- Stop `remix dev` when `esbuild` is not running ([#7158](https://github.com/remix-run/remix/pull/7158))
|
|
836
|
+
|
|
837
|
+
- Do not interpret JSX in `.ts` files ([#7306](https://github.com/remix-run/remix/pull/7306))
|
|
838
|
+
|
|
839
|
+
- While JSX is supported in `.js` files for compatibility with existing apps and libraries,
|
|
840
|
+
`.ts` files should not contain JSX. By not interpreting `.ts` files as JSX, `.ts` files
|
|
841
|
+
can contain single-argument type generics without needing a comma to disambiguate from JSX:
|
|
842
|
+
|
|
843
|
+
```ts
|
|
844
|
+
// this works in .ts files
|
|
845
|
+
const id = <T>(x: T) => x;
|
|
846
|
+
// ^ single-argument type generic
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
```tsx
|
|
850
|
+
// this doesn't work in .tsx files
|
|
851
|
+
const id = <T,>(x: T) => x;
|
|
852
|
+
// ^ is this a JSX element? or a single-argument type generic?
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
```tsx
|
|
856
|
+
// this works in .tsx files
|
|
857
|
+
const id = <T,>(x: T) => x;
|
|
858
|
+
// ^ comma: this is a generic, not a JSX element
|
|
859
|
+
const component = <h1>hello</h1>;
|
|
860
|
+
// ^ no comma: this is a JSX element
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
- Enhance obsolete flag warning for `future.v2_dev` if it was an object, and prompt users to lift it to the root `dev` config ([#7427](https://github.com/remix-run/remix/pull/7427))
|
|
864
|
+
|
|
865
|
+
- Allow decorators in app code ([#7176](https://github.com/remix-run/remix/pull/7176))
|
|
866
|
+
|
|
867
|
+
- Allow JSX in `.js` files during HMR ([#7112](https://github.com/remix-run/remix/pull/7112))
|
|
868
|
+
|
|
869
|
+
- Kill app server when remix dev terminates ([#7280](https://github.com/remix-run/remix/pull/7280))
|
|
870
|
+
|
|
871
|
+
- Support dependencies that import polyfill packages for Node built-ins via a trailing slash (e.g. importing the `buffer` package with `var Buffer = require('buffer/').Buffer` as recommended in their README) ([#7198](https://github.com/remix-run/remix/pull/7198))
|
|
872
|
+
|
|
873
|
+
- These imports were previously marked as external
|
|
874
|
+
- This meant that they were left as dynamic imports in the client bundle and would throw a runtime error in the browser (e.g. `Dynamic require of "buffer/" is not supported`)
|
|
875
|
+
|
|
876
|
+
- Surface errors when PostCSS config is invalid ([#7391](https://github.com/remix-run/remix/pull/7391))
|
|
877
|
+
|
|
878
|
+
- Restart dev server when Remix config changes ([#7269](https://github.com/remix-run/remix/pull/7269))
|
|
879
|
+
|
|
880
|
+
- Remove outdated ESM import warnings ([#6916](https://github.com/remix-run/remix/pull/6916))
|
|
881
|
+
|
|
882
|
+
- Most of the time these warnings were false positives.
|
|
883
|
+
- Instead, we now rely on built-in Node warnings for ESM imports.
|
|
884
|
+
|
|
885
|
+
- Do not trigger rebuilds when `.DS_Store` changes ([#7172](https://github.com/remix-run/remix/pull/7172))
|
|
886
|
+
|
|
887
|
+
- Remove warnings for stabilized flags: ([#6905](https://github.com/remix-run/remix/pull/6905))
|
|
888
|
+
|
|
889
|
+
- `unstable_cssSideEffectImports`
|
|
890
|
+
- `unstable_cssModules`
|
|
891
|
+
- `unstable_vanillaExtract`
|
|
892
|
+
|
|
893
|
+
- Allow any mode (`NODE_ENV`) ([#7113](https://github.com/remix-run/remix/pull/7113))
|
|
894
|
+
|
|
895
|
+
- Replace the deprecated [`xdm`](https://github.com/wooorm/xdm) package with [`@mdx-js/mdx`](https://github.com/mdx-js/mdx) ([#4054](https://github.com/remix-run/remix/pull/4054))
|
|
896
|
+
|
|
897
|
+
- Write a `version.txt` sentinel file _after_ server build is completely written ([#7299](https://github.com/remix-run/remix/pull/7299))
|
|
898
|
+
|
|
899
|
+
- Updated dependencies:
|
|
900
|
+
- `@remix-run/server-runtime@2.0.0`
|
|
901
|
+
|
|
902
|
+
## 1.19.3
|
|
903
|
+
|
|
904
|
+
### Patch Changes
|
|
905
|
+
|
|
906
|
+
- Show deprecation warning when using `devServerBroadcastDelay` and `devServerPort` config options ([#7064](https://github.com/remix-run/remix/pull/7064))
|
|
907
|
+
- Updated dependencies:
|
|
908
|
+
- `@remix-run/server-runtime@1.19.3`
|
|
909
|
+
|
|
910
|
+
## 1.19.2
|
|
911
|
+
|
|
912
|
+
### Patch Changes
|
|
913
|
+
|
|
914
|
+
- Update `proxy-agent` to resolve npm audit security vulnerability ([#7027](https://github.com/remix-run/remix/pull/7027))
|
|
915
|
+
- Updated dependencies:
|
|
916
|
+
- `@remix-run/server-runtime@1.19.2`
|
|
917
|
+
|
|
918
|
+
## 1.19.1
|
|
919
|
+
|
|
920
|
+
### Patch Changes
|
|
921
|
+
|
|
922
|
+
- Add a heartbeat ping to prevent the WebSocket connection from being closed due to inactivity when using a proxy like Cloudflare ([#6904](https://github.com/remix-run/remix/pull/6904), [#6927](https://github.com/remix-run/remix/pull/6927))
|
|
923
|
+
- Treeshake out HMR code from production builds ([#6894](https://github.com/remix-run/remix/pull/6894))
|
|
924
|
+
- Updated dependencies:
|
|
925
|
+
- `@remix-run/server-runtime@1.19.1`
|
|
926
|
+
|
|
927
|
+
## 1.19.0
|
|
928
|
+
|
|
929
|
+
### Minor Changes
|
|
930
|
+
|
|
931
|
+
- improved networking options for `v2_dev` ([#6724](https://github.com/remix-run/remix/pull/6724))
|
|
932
|
+
|
|
933
|
+
deprecate the `--scheme` and `--host` options and replace them with the `REMIX_DEV_ORIGIN` environment variable
|
|
934
|
+
|
|
935
|
+
- Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
|
|
936
|
+
|
|
937
|
+
Written to server build directory (`build/` by default):
|
|
938
|
+
|
|
939
|
+
- `metafile.css.json`
|
|
940
|
+
- `metafile.js.json` (browser JS)
|
|
941
|
+
- `metafile.server.json` (server JS)
|
|
942
|
+
|
|
943
|
+
Metafiles can be uploaded to <https://esbuild.github.io/analyze/> for analysis.
|
|
944
|
+
|
|
945
|
+
- Add `serverNodeBuiltinsPolyfill` config option. In `remix.config.js` you can now disable polyfills of Node.js built-in modules for non-Node.js server platforms, or opt into a subset of polyfills. ([#6814](https://github.com/remix-run/remix/pull/6814), [#6859](https://github.com/remix-run/remix/pull/6859), [#6877](https://github.com/remix-run/remix/pull/6877))
|
|
946
|
+
|
|
947
|
+
```js
|
|
948
|
+
// Disable all polyfills
|
|
949
|
+
exports.serverNodeBuiltinsPolyfill = { modules: {} };
|
|
950
|
+
|
|
951
|
+
// Enable specific polyfills
|
|
952
|
+
exports.serverNodeBuiltinsPolyfill = {
|
|
953
|
+
modules: {
|
|
954
|
+
crypto: true, // Provide a JSPM polyfill
|
|
955
|
+
fs: "empty", // Provide an empty polyfill
|
|
956
|
+
},
|
|
957
|
+
};
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
### Patch Changes
|
|
961
|
+
|
|
962
|
+
- ignore missing react-dom/client for react 17 ([#6725](https://github.com/remix-run/remix/pull/6725))
|
|
963
|
+
|
|
964
|
+
- Warn if not using `v2_dev` ([#6818](https://github.com/remix-run/remix/pull/6818))
|
|
965
|
+
|
|
966
|
+
Also, rename `--no-restart` to `--manual` to match intention and documentation.
|
|
967
|
+
`--no-restart` remains an alias for `--manual` in v1 for backwards compatibility.
|
|
968
|
+
|
|
969
|
+
- ignore errors when killing already dead processes ([#6773](https://github.com/remix-run/remix/pull/6773))
|
|
970
|
+
|
|
971
|
+
- Always rewrite css-derived assets during builds ([#6837](https://github.com/remix-run/remix/pull/6837))
|
|
972
|
+
|
|
973
|
+
- fix sourcemaps for `v2_dev` ([#6762](https://github.com/remix-run/remix/pull/6762))
|
|
974
|
+
|
|
975
|
+
- Do not clear screen when dev server starts ([#6719](https://github.com/remix-run/remix/pull/6719))
|
|
976
|
+
|
|
977
|
+
On some terminal emulators, "clearing" only scrolls the next line to the
|
|
978
|
+
top. on others, it erases the scrollback.
|
|
979
|
+
|
|
980
|
+
Instead, let users call `clear` themselves (`clear && remix dev`) if
|
|
981
|
+
they want to clear.
|
|
982
|
+
|
|
983
|
+
- Updated dependencies:
|
|
984
|
+
- `@remix-run/server-runtime@1.19.0`
|
|
985
|
+
|
|
986
|
+
## 1.18.1
|
|
987
|
+
|
|
988
|
+
### Patch Changes
|
|
989
|
+
|
|
990
|
+
- Ignore missing `react-dom/client` for React 17 ([#6725](https://github.com/remix-run/remix/pull/6725))
|
|
991
|
+
- Updated dependencies:
|
|
992
|
+
- `@remix-run/server-runtime@1.18.1`
|
|
993
|
+
|
|
994
|
+
## 1.18.0
|
|
995
|
+
|
|
996
|
+
### Minor Changes
|
|
997
|
+
|
|
998
|
+
- stabilize v2 dev server ([#6615](https://github.com/remix-run/remix/pull/6615))
|
|
999
|
+
- improved logging for `remix build` and `remix dev` ([#6596](https://github.com/remix-run/remix/pull/6596))
|
|
1000
|
+
|
|
1001
|
+
### Patch Changes
|
|
1002
|
+
|
|
1003
|
+
- fix docs links for msw and mkcert ([#6672](https://github.com/remix-run/remix/pull/6672))
|
|
1004
|
+
- fix `remix dev -c`: kill all descendant processes of specified command when restarting ([#6663](https://github.com/remix-run/remix/pull/6663))
|
|
1005
|
+
- Add caching to regular stylesheet compilation ([#6638](https://github.com/remix-run/remix/pull/6638))
|
|
1006
|
+
- Rename `Architect (AWS Lambda)` -> `Architect` in the `create-remix` CLI to avoid confusion for other methods of deploying to AWS (i.e., SST) ([#6484](https://github.com/remix-run/remix/pull/6484))
|
|
1007
|
+
- Improve CSS bundle build performance by skipping unused Node polyfills ([#6639](https://github.com/remix-run/remix/pull/6639))
|
|
1008
|
+
- Improve performance of CSS bundle build by skipping compilation of Remix/React packages that are known not to contain CSS imports ([#6654](https://github.com/remix-run/remix/pull/6654))
|
|
1009
|
+
- Cache CSS side-effect imports transform when using HMR ([#6622](https://github.com/remix-run/remix/pull/6622))
|
|
1010
|
+
- Fix bug with pathless layout routes beneath nested path segments ([#6649](https://github.com/remix-run/remix/pull/6649))
|
|
1011
|
+
- Add caching to PostCSS for CSS Modules ([#6604](https://github.com/remix-run/remix/pull/6604))
|
|
1012
|
+
- Add caching to PostCSS for side-effect imports ([#6554](https://github.com/remix-run/remix/pull/6554))
|
|
1013
|
+
- cache getRouteModuleExports calls to significantly speed up build and HMR rebuild times ([#6629](https://github.com/remix-run/remix/pull/6629))
|
|
1014
|
+
- group rebuild logs with surrounding whitespace ([#6607](https://github.com/remix-run/remix/pull/6607))
|
|
1015
|
+
- instructions for integrating with msw ([#6669](https://github.com/remix-run/remix/pull/6669))
|
|
1016
|
+
- Update minimum version of `esbuild-plugins-node-modules-polyfill` to 1.0.16 to ensure that the plugin is cached ([#6652](https://github.com/remix-run/remix/pull/6652))
|
|
1017
|
+
- Updated dependencies:
|
|
1018
|
+
- `@remix-run/server-runtime@1.18.0`
|
|
1019
|
+
|
|
1020
|
+
## 1.17.1
|
|
1021
|
+
|
|
1022
|
+
### Patch Changes
|
|
1023
|
+
|
|
1024
|
+
- Replace `esbuild-plugin-polyfill-node` with `esbuild-plugins-node-modules-polyfill` ([#6562](https://github.com/remix-run/remix/pull/6562))
|
|
1025
|
+
- Lazily generate CSS bundle when import of `@remix-run/css-bundle` is detected ([#6535](https://github.com/remix-run/remix/pull/6535))
|
|
1026
|
+
- Updated dependencies:
|
|
1027
|
+
- `@remix-run/server-runtime@1.17.1`
|
|
1028
|
+
|
|
1029
|
+
## 1.17.0
|
|
1030
|
+
|
|
1031
|
+
### Minor Changes
|
|
1032
|
+
|
|
1033
|
+
- built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
|
|
1034
|
+
|
|
1035
|
+
New options:
|
|
1036
|
+
|
|
1037
|
+
- `--tls-key` / `tlsKey`: TLS key
|
|
1038
|
+
- `--tls-cert` / `tlsCert`: TLS Certificate
|
|
1039
|
+
|
|
1040
|
+
If both TLS options are set, `scheme` defaults to `https`
|
|
1041
|
+
|
|
1042
|
+
## Example
|
|
1043
|
+
|
|
1044
|
+
Install [mkcert](https://github.com/FiloSottile/mkcert) and create a local CA:
|
|
1045
|
+
|
|
1046
|
+
```sh
|
|
1047
|
+
brew install mkcert
|
|
1048
|
+
mkcert -install
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
Then make sure you inform `node` about your CA certs:
|
|
1052
|
+
|
|
1053
|
+
```sh
|
|
1054
|
+
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
👆 You'll probably want to put that env var in your scripts or `.bashrc`/`.zshrc`
|
|
1058
|
+
|
|
1059
|
+
Now create `key.pem` and `cert.pem`:
|
|
1060
|
+
|
|
1061
|
+
```sh
|
|
1062
|
+
mkcert -key-file key.pem -cert-file cert.pem localhost
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
See `mkcert` docs for more details.
|
|
1066
|
+
|
|
1067
|
+
Finally, pass in the paths to the key and cert via flags:
|
|
1068
|
+
|
|
1069
|
+
```sh
|
|
1070
|
+
remix dev --tls-key=key.pem --tls-cert=cert.pem
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
or via config:
|
|
1074
|
+
|
|
1075
|
+
```js
|
|
1076
|
+
module.exports = {
|
|
1077
|
+
future: {
|
|
1078
|
+
unstable_dev: {
|
|
1079
|
+
tlsKey: "key.pem",
|
|
1080
|
+
tlsCert: "cert.pem",
|
|
1081
|
+
},
|
|
1082
|
+
},
|
|
1083
|
+
};
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
That's all that's needed to set up the Remix Dev Server with TLS.
|
|
1087
|
+
|
|
1088
|
+
🚨 Make sure to update your app server for TLS as well.
|
|
1089
|
+
|
|
1090
|
+
For example, with `express`:
|
|
1091
|
+
|
|
1092
|
+
```ts
|
|
1093
|
+
import fs from "node:fs";
|
|
1094
|
+
import https from "node:https";
|
|
1095
|
+
|
|
1096
|
+
import express from "express";
|
|
1097
|
+
|
|
1098
|
+
const app = express();
|
|
1099
|
+
|
|
1100
|
+
// ...code setting up your express app...
|
|
1101
|
+
|
|
1102
|
+
const appServer = https.createServer(
|
|
1103
|
+
{
|
|
1104
|
+
key: fs.readFileSync("key.pem"),
|
|
1105
|
+
cert: fs.readFileSync("cert.pem"),
|
|
1106
|
+
},
|
|
1107
|
+
app
|
|
1108
|
+
);
|
|
1109
|
+
|
|
1110
|
+
appServer.listen(3000, () => {
|
|
1111
|
+
console.log("Ready on https://localhost:3000");
|
|
1112
|
+
});
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
## Known limitations
|
|
1116
|
+
|
|
1117
|
+
`remix-serve` does not yet support TLS.
|
|
1118
|
+
That means this only works for custom app server using the `-c` flag for now.
|
|
1119
|
+
|
|
1120
|
+
- Reuse dev server port for WebSocket (Live Reload,HMR,HDR) ([#6476](https://github.com/remix-run/remix/pull/6476))
|
|
1121
|
+
|
|
1122
|
+
As a result the `webSocketPort`/`--websocket-port` option has been obsoleted.
|
|
1123
|
+
Additionally, scheme/host/port options for the dev server have been renamed.
|
|
1124
|
+
|
|
1125
|
+
Available options are:
|
|
1126
|
+
|
|
1127
|
+
| Option | flag | config | default |
|
|
1128
|
+
| ---------- | ------------------ | ---------------- | --------------------------------- |
|
|
1129
|
+
| Command | `-c` / `--command` | `command` | `remix-serve <server build path>` |
|
|
1130
|
+
| Scheme | `--scheme` | `scheme` | `http` |
|
|
1131
|
+
| Host | `--host` | `host` | `localhost` |
|
|
1132
|
+
| Port | `--port` | `port` | Dynamically chosen open port |
|
|
1133
|
+
| No restart | `--no-restart` | `restart: false` | `restart: true` |
|
|
1134
|
+
|
|
1135
|
+
Note that scheme/host/port options are for the _dev server_, not your app server.
|
|
1136
|
+
You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL).
|
|
1137
|
+
|
|
1138
|
+
### Patch Changes
|
|
1139
|
+
|
|
1140
|
+
- Add caching to PostCSS for regular stylesheets ([#6505](https://github.com/remix-run/remix/pull/6505))
|
|
1141
|
+
|
|
1142
|
+
- Fix warnings when importing CSS files with `future.unstable_dev` enabled ([#6506](https://github.com/remix-run/remix/pull/6506))
|
|
1143
|
+
|
|
1144
|
+
- Fix Tailwind performance issue when `postcss.config.js` contains `plugins: { tailwindcss: {} }` and `remix.config.js` contains both `tailwind: true` and `postcss: true`. ([#6468](https://github.com/remix-run/remix/pull/6468))
|
|
1145
|
+
|
|
1146
|
+
Note that this was _not_ an issue when the plugin function had been explicitly called, i.e. `plugins: [tailwindcss()]`. Remix avoids adding the Tailwind plugin to PostCSS if it's already present but we were failing to detect when the plugin function hadn't been called — either because the plugin function itself had been passed, i.e. `plugins: [require('tailwindcss')]`, or the plugin config object syntax had been used, i.e. `plugins: { tailwindcss: {} }`.
|
|
1147
|
+
|
|
1148
|
+
- Faster server export removal for routes when `unstable_dev` is enabled. ([#6455](https://github.com/remix-run/remix/pull/6455))
|
|
1149
|
+
|
|
1150
|
+
Also, only render modulepreloads on SSR.
|
|
1151
|
+
Do not render modulepreloads when hydrated.
|
|
1152
|
+
|
|
1153
|
+
- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247))
|
|
1154
|
+
|
|
1155
|
+
```tsx
|
|
1156
|
+
import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
|
|
1157
|
+
|
|
1158
|
+
export function headers({ loaderHeaders }: HeadersArgs) {
|
|
1159
|
+
return {
|
|
1160
|
+
"x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
- better error message when `remix-serve` is not found ([#6477](https://github.com/remix-run/remix/pull/6477))
|
|
1166
|
+
|
|
1167
|
+
- restore color for app server output ([#6485](https://github.com/remix-run/remix/pull/6485))
|
|
1168
|
+
|
|
1169
|
+
- Fix route ranking bug with pathless layout route next to a sibling index route ([#4421](https://github.com/remix-run/remix/pull/4421))
|
|
1170
|
+
|
|
1171
|
+
- Under the hood this is done by removing the trailing slash from all generated `path` values since the number of slash-delimited segments counts towards route ranking so the trailing slash incorrectly increases the score for routes
|
|
1172
|
+
|
|
1173
|
+
- Support sibling pathless layout routes by removing pathless layout routes from the unique route path checks in conventional route generation since they inherently trigger duplicate paths ([#4421](https://github.com/remix-run/remix/pull/4421))
|
|
1174
|
+
|
|
1175
|
+
- fix dev server crashes caused by ungraceful hdr error handling ([#6467](https://github.com/remix-run/remix/pull/6467))
|
|
1176
|
+
|
|
1177
|
+
- Updated dependencies:
|
|
1178
|
+
- `@remix-run/server-runtime@1.17.0`
|
|
1179
|
+
|
|
1180
|
+
## 1.16.1
|
|
1181
|
+
|
|
1182
|
+
### Patch Changes
|
|
1183
|
+
|
|
1184
|
+
- Cross-module `loader` change detection for HDR ([#6299](https://github.com/remix-run/remix/pull/6299))
|
|
1185
|
+
- Normalize path for dev server `PATH` envvar so that it works cross-platform (e.g. Windows) ([#6310](https://github.com/remix-run/remix/pull/6310))
|
|
1186
|
+
- Fix CSS imports in JS files that use JSX ([#6309](https://github.com/remix-run/remix/pull/6309))
|
|
1187
|
+
- Kill app server when dev server exits ([#6395](https://github.com/remix-run/remix/pull/6395))
|
|
1188
|
+
- Wait until app server is killed before starting a new app server ([#6289](https://github.com/remix-run/remix/pull/6289))
|
|
1189
|
+
- Ensure CSS bundle changes result in a new manifest hash ([#6374](https://github.com/remix-run/remix/pull/6374))
|
|
1190
|
+
- Normalize file paths before testing if a changed file is a route entry ([#6293](https://github.com/remix-run/remix/pull/6293))
|
|
1191
|
+
- Fix race where app server responds with updated manifest version _before_ dev server is listening for it ([#6294](https://github.com/remix-run/remix/pull/6294))
|
|
1192
|
+
- dev server now listens for updated versions _before_ writing the server changes, guaranteeing that it is listening before the app server gets a chance to send its 'ready' message
|
|
1193
|
+
- Only process `.css.ts`/`.css.js` files with Vanilla Extract if `@vanilla-extract/css` is installed ([#6345](https://github.com/remix-run/remix/pull/6345))
|
|
1194
|
+
- Stop modifying a user's `tsconfig.json` when running using `getConfig` (`remix dev`, `remix routes`, `remix build`, etc) ([#6156](https://github.com/remix-run/remix/pull/6156))
|
|
1195
|
+
- Cancel previous build when rebuild is kicked off to prevent rebuilds from hanging ([#6295](https://github.com/remix-run/remix/pull/6295))
|
|
1196
|
+
- Update minimum version of Babel dependencies to avoid errors parsing decorators ([#6390](https://github.com/remix-run/remix/pull/6390))
|
|
1197
|
+
- Support asset imports when detecting loader changes for HDR ([#6396](https://github.com/remix-run/remix/pull/6396))
|
|
1198
|
+
- Updated dependencies:
|
|
1199
|
+
- `@remix-run/server-runtime@1.16.1`
|
|
1200
|
+
|
|
1201
|
+
## 1.16.0
|
|
1202
|
+
|
|
1203
|
+
### Minor Changes
|
|
1204
|
+
|
|
1205
|
+
- Enable support for [CSS Modules](https://github.com/css-modules/css-modules), [Vanilla Extract](http://vanilla-extract.style) and CSS side-effect imports ([#6046](https://github.com/remix-run/remix/pull/6046))
|
|
1206
|
+
|
|
1207
|
+
These CSS bundling features were previously only available via `future.unstable_cssModules`, `future.unstable_vanillaExtract` and `future.unstable_cssSideEffectImports` options in `remix.config.js`, but they have now been stabilized.
|
|
1208
|
+
|
|
1209
|
+
In order to use these features, check out our guide to [CSS bundling](https://remix.run/docs/en/1.16.0/guides/styling#css-bundling) in your project.
|
|
1210
|
+
|
|
1211
|
+
- Stabilize built-in PostCSS support via the new `postcss` option in `remix.config.js`. As a result, the `future.unstable_postcss` option has also been deprecated. ([#5960](https://github.com/remix-run/remix/pull/5960))
|
|
1212
|
+
|
|
1213
|
+
The `postcss` option is `false` by default, but when set to `true` will enable processing of all CSS files using PostCSS if `postcss.config.js` is present.
|
|
1214
|
+
|
|
1215
|
+
If you followed the original PostCSS setup guide for Remix, you may have a folder structure that looks like this, separating your source files from its processed output:
|
|
1216
|
+
|
|
1217
|
+
.
|
|
1218
|
+
├── app
|
|
1219
|
+
│ └── styles (processed files)
|
|
1220
|
+
│ ├── app.css
|
|
1221
|
+
│ └── routes
|
|
1222
|
+
│ └── index.css
|
|
1223
|
+
└── styles (source files)
|
|
1224
|
+
├── app.css
|
|
1225
|
+
└── routes
|
|
1226
|
+
└── index.css
|
|
1227
|
+
|
|
1228
|
+
After you've enabled the new `postcss` option, you can delete the processed files from `app/styles` folder and move your source files from `styles` to `app/styles`:
|
|
1229
|
+
|
|
1230
|
+
.
|
|
1231
|
+
├── app
|
|
1232
|
+
│ └── styles (source files)
|
|
1233
|
+
│ ├── app.css
|
|
1234
|
+
│ └── routes
|
|
1235
|
+
│ └── index.css
|
|
1236
|
+
|
|
1237
|
+
You should then remove `app/styles` from your `.gitignore` file since it now contains source files rather than processed output.
|
|
1238
|
+
|
|
1239
|
+
You can then update your `package.json` scripts to remove any usage of `postcss` since Remix handles this automatically. For example, if you had followed the original setup guide:
|
|
1240
|
+
|
|
1241
|
+
```diff
|
|
1242
|
+
{
|
|
1243
|
+
"scripts": {
|
|
1244
|
+
- "dev:css": "postcss styles --base styles --dir app/styles -w",
|
|
1245
|
+
- "build:css": "postcss styles --base styles --dir app/styles --env production",
|
|
1246
|
+
- "dev": "concurrently \"npm run dev:css\" \"remix dev\""
|
|
1247
|
+
+ "dev": "remix dev"
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
- Stabilize built-in Tailwind support via the new `tailwind` option in `remix.config.js`. As a result, the `future.unstable_tailwind` option has also been deprecated. ([#5960](https://github.com/remix-run/remix/pull/5960))
|
|
1253
|
+
|
|
1254
|
+
The `tailwind` option is `false` by default, but when set to `true` will enable built-in support for Tailwind functions and directives in your CSS files if `tailwindcss` is installed.
|
|
1255
|
+
|
|
1256
|
+
If you followed the original Tailwind setup guide for Remix and want to make use of this feature, you should first delete the generated `app/tailwind.css`.
|
|
1257
|
+
|
|
1258
|
+
Then, if you have a `styles/tailwind.css` file, you should move it to `app/tailwind.css`.
|
|
1259
|
+
|
|
1260
|
+
```sh
|
|
1261
|
+
rm app/tailwind.css
|
|
1262
|
+
mv styles/tailwind.css app/tailwind.css
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
Otherwise, if you don't already have an `app/tailwind.css` file, you should create one with the following contents:
|
|
1266
|
+
|
|
1267
|
+
```css
|
|
1268
|
+
@tailwind base;
|
|
1269
|
+
@tailwind components;
|
|
1270
|
+
@tailwind utilities;
|
|
1271
|
+
```
|
|
1272
|
+
|
|
1273
|
+
You should then remove `/app/tailwind.css` from your `.gitignore` file since it now contains source code rather than processed output.
|
|
1274
|
+
|
|
1275
|
+
You can then update your `package.json` scripts to remove any usage of `tailwindcss` since Remix handles this automatically. For example, if you had followed the original setup guide:
|
|
1276
|
+
|
|
1277
|
+
```diff
|
|
1278
|
+
{
|
|
1279
|
+
// ...
|
|
1280
|
+
"scripts": {
|
|
1281
|
+
- "build": "run-s \"build:*\"",
|
|
1282
|
+
+ "build": "remix build",
|
|
1283
|
+
- "build:css": "npm run generate:css -- --minify",
|
|
1284
|
+
- "build:remix": "remix build",
|
|
1285
|
+
- "dev": "run-p \"dev:*\"",
|
|
1286
|
+
+ "dev": "remix dev",
|
|
1287
|
+
- "dev:css": "npm run generate:css -- --watch",
|
|
1288
|
+
- "dev:remix": "remix dev",
|
|
1289
|
+
- "generate:css": "npx tailwindcss -o ./app/tailwind.css",
|
|
1290
|
+
"start": "remix-serve build"
|
|
1291
|
+
}
|
|
1292
|
+
// ...
|
|
1293
|
+
}
|
|
1294
|
+
```
|
|
1295
|
+
|
|
1296
|
+
- The Remix dev server spins up your app server as a managed subprocess. ([#6133](https://github.com/remix-run/remix/pull/6133))
|
|
1297
|
+
This keeps your development environment as close to production as possible.
|
|
1298
|
+
It also means that the Remix dev server is compatible with _any_ app server.
|
|
1299
|
+
|
|
1300
|
+
By default, the dev server will use the Remix App Server, but you opt to use your own app server by specifying the command to run it via the `-c`/`--command` flag:
|
|
1301
|
+
|
|
1302
|
+
```sh
|
|
1303
|
+
remix dev # uses `remix-serve <serve build path>` as the app server
|
|
1304
|
+
remix dev -c "node ./server.js" # uses your custom app server at `./server.js`
|
|
1305
|
+
```
|
|
1306
|
+
|
|
1307
|
+
The dev server will:
|
|
1308
|
+
|
|
1309
|
+
- force `NODE_ENV=development` and warn you if it was previously set to something else
|
|
1310
|
+
- rebuild your app whenever your Remix app code changes
|
|
1311
|
+
- restart your app server whenever rebuilds succeed
|
|
1312
|
+
- handle live reload and HMR + Hot Data Revalidation
|
|
1313
|
+
|
|
1314
|
+
### App server coordination
|
|
1315
|
+
|
|
1316
|
+
In order to manage your app server, the dev server needs to be told what server build is currently being used by your app server.
|
|
1317
|
+
This works by having the app server send a "I'm ready!" message with the Remix server build hash as the payload.
|
|
1318
|
+
|
|
1319
|
+
This is handled automatically in Remix App Server and is set up for you via calls to `broadcastDevReady` or `logDevReady` in the official Remix templates.
|
|
1320
|
+
|
|
1321
|
+
If you are not using Remix App Server and your server doesn't call `broadcastDevReady`, you'll need to call it in your app server _after_ it is up and running.
|
|
1322
|
+
For example, in an Express server:
|
|
1323
|
+
|
|
1324
|
+
```js
|
|
1325
|
+
// server.js
|
|
1326
|
+
// <other imports>
|
|
1327
|
+
import { broadcastDevReady } from "@remix-run/node";
|
|
1328
|
+
|
|
1329
|
+
// Path to Remix's server build directory ('build/' by default)
|
|
1330
|
+
const BUILD_DIR = path.join(process.cwd(), "build");
|
|
1331
|
+
|
|
1332
|
+
// <code setting up your express server>
|
|
1333
|
+
|
|
1334
|
+
app.listen(3000, () => {
|
|
1335
|
+
const build = require(BUILD_DIR);
|
|
1336
|
+
console.log("Ready: http://localhost:" + port);
|
|
1337
|
+
|
|
1338
|
+
// in development, call `broadcastDevReady` _after_ your server is up and running
|
|
1339
|
+
if (process.env.NODE_ENV === "development") {
|
|
1340
|
+
broadcastDevReady(build);
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
### Options
|
|
1346
|
+
|
|
1347
|
+
Options priority order is: 1. flags, 2. config, 3. defaults.
|
|
1348
|
+
|
|
1349
|
+
| Option | flag | config | default |
|
|
1350
|
+
| -------------- | ------------------ | ---------------- | --------------------------------- |
|
|
1351
|
+
| Command | `-c` / `--command` | `command` | `remix-serve <server build path>` |
|
|
1352
|
+
| HTTP(S) scheme | `--http-scheme` | `httpScheme` | `http` |
|
|
1353
|
+
| HTTP(S) host | `--http-host` | `httpHost` | `localhost` |
|
|
1354
|
+
| HTTP(S) port | `--http-port` | `httpPort` | Dynamically chosen open port |
|
|
1355
|
+
| Websocket port | `--websocket-port` | `websocketPort` | Dynamically chosen open port |
|
|
1356
|
+
| No restart | `--no-restart` | `restart: false` | `restart: true` |
|
|
1357
|
+
|
|
1358
|
+
🚨 The `--http-*` flags are only used for internal dev server <-> app server communication.
|
|
1359
|
+
Your app will run on your app server's normal URL.
|
|
1360
|
+
|
|
1361
|
+
To set `unstable_dev` configuration, replace `unstable_dev: true` with `unstable_dev: { <options> }`.
|
|
1362
|
+
For example, to set the HTTP(S) port statically:
|
|
1363
|
+
|
|
1364
|
+
```js
|
|
1365
|
+
// remix.config.js
|
|
1366
|
+
module.exports = {
|
|
1367
|
+
future: {
|
|
1368
|
+
unstable_dev: {
|
|
1369
|
+
httpPort: 8001,
|
|
1370
|
+
},
|
|
1371
|
+
},
|
|
1372
|
+
};
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
#### SSL and custom hosts
|
|
1376
|
+
|
|
1377
|
+
You should only need to use the `--http-*` flags and `--websocket-port` flag if you need fine-grain control of what scheme/host/port for the dev server.
|
|
1378
|
+
If you are setting up SSL or Docker networking, these are the flags you'll want to use.
|
|
1379
|
+
|
|
1380
|
+
🚨 Remix **will not** set up SSL and custom host for you.
|
|
1381
|
+
The `--http-scheme` and `--http-host` flag are for you to tell Remix how you've set things up.
|
|
1382
|
+
It is your task to set up SSL certificates and host files if you want those features.
|
|
1383
|
+
|
|
1384
|
+
#### `--no-restart` and `require` cache purging
|
|
1385
|
+
|
|
1386
|
+
If you want to manage server changes yourself, you can use the `--no-restart` flag to tell the dev server to refrain from restarting your app server when builds succeed:
|
|
1387
|
+
|
|
1388
|
+
```sh
|
|
1389
|
+
remix dev -c "node ./server.js" --no-restart
|
|
1390
|
+
```
|
|
1391
|
+
|
|
1392
|
+
For example, you could purge the `require` cache of your app server to keep it running while picking up server changes.
|
|
1393
|
+
If you do so, you should watch the server build path (`build/` by default) for changes and only purge the `require` cache when changes are detected.
|
|
1394
|
+
|
|
1395
|
+
🚨 If you use `--no-restart`, it is your responsibility to call `broadcastDevReady` when your app server has picked up server changes.
|
|
1396
|
+
For example, with `chokidar`:
|
|
1397
|
+
|
|
1398
|
+
```js
|
|
1399
|
+
// server.dev.js
|
|
1400
|
+
const BUILD_PATH = path.resolve(__dirname, "build");
|
|
1401
|
+
|
|
1402
|
+
const watcher = chokidar.watch(BUILD_PATH);
|
|
1403
|
+
|
|
1404
|
+
watcher.on("change", () => {
|
|
1405
|
+
// 1. purge require cache
|
|
1406
|
+
purgeRequireCache();
|
|
1407
|
+
// 2. load updated server build
|
|
1408
|
+
const build = require(BUILD_PATH);
|
|
1409
|
+
// 3. tell dev server that this app server is now ready
|
|
1410
|
+
broadcastDevReady(build);
|
|
1411
|
+
});
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1414
|
+
### Patch Changes
|
|
1415
|
+
|
|
1416
|
+
- Fix absolute paths in CSS `url()` rules when using CSS Modules, Vanilla Extract and CSS side-effect imports ([#5788](https://github.com/remix-run/remix/pull/5788))
|
|
1417
|
+
- look for @remix-run/serve in `devDependencies` when running remix dev ([#6228](https://github.com/remix-run/remix/pull/6228))
|
|
1418
|
+
- add warning for v2 "cjs"->"esm" `serverModuleFormat` default change ([#6154](https://github.com/remix-run/remix/pull/6154))
|
|
1419
|
+
- write mjs server output files ([#6225](https://github.com/remix-run/remix/pull/6225))
|
|
1420
|
+
- fix(react,dev): dev chunking and refresh race condition ([#6201](https://github.com/remix-run/remix/pull/6201))
|
|
1421
|
+
- Use correct require context in `bareImports` plugin. ([#6181](https://github.com/remix-run/remix/pull/6181))
|
|
1422
|
+
- use minimatch for regex instead of glob-to-regexp ([#6017](https://github.com/remix-run/remix/pull/6017))
|
|
1423
|
+
- add `logDevReady` as replacement for platforms that can't initialize async I/O outside of the request response lifecycle. ([#6204](https://github.com/remix-run/remix/pull/6204))
|
|
1424
|
+
- Use the "automatic" JSX runtime when processing MDX files. ([#6098](https://github.com/remix-run/remix/pull/6098))
|
|
1425
|
+
- forcibly kill app server during dev ([#6197](https://github.com/remix-run/remix/pull/6197))
|
|
1426
|
+
- show first compilation error instead of cancelation errors ([#6202](https://github.com/remix-run/remix/pull/6202))
|
|
1427
|
+
- Resolve imports from route modules across the graph back to the virtual module created by the v2 routes plugin. This fixes issues where we would duplicate portions of route modules that were imported. ([#6098](https://github.com/remix-run/remix/pull/6098))
|
|
1428
|
+
- Updated dependencies:
|
|
1429
|
+
- `@remix-run/server-runtime@1.16.0`
|
|
1430
|
+
|
|
1431
|
+
## 1.15.0
|
|
1432
|
+
|
|
1433
|
+
### Minor Changes
|
|
1434
|
+
|
|
1435
|
+
- Added deprecation warning for `v2_normalizeFormMethod` ([#5863](https://github.com/remix-run/remix/pull/5863))
|
|
1436
|
+
|
|
1437
|
+
- Added a new `future.v2_normalizeFormMethod` flag to normalize the exposed `useNavigation().formMethod` as an uppercase HTTP method to align with the previous `useTransition` behavior as well as the `fetch()` behavior of normalizing to uppercase HTTP methods. ([#5815](https://github.com/remix-run/remix/pull/5815))
|
|
1438
|
+
|
|
1439
|
+
- When `future.v2_normalizeFormMethod === false`,
|
|
1440
|
+
- `useNavigation().formMethod` is lowercase
|
|
1441
|
+
- `useFetcher().formMethod` is uppercase
|
|
1442
|
+
- When `future.v2_normalizeFormMethod === true`:
|
|
1443
|
+
- `useNavigation().formMethod` is uppercase
|
|
1444
|
+
- `useFetcher().formMethod` is uppercase
|
|
1445
|
+
|
|
1446
|
+
- Added deprecation warning for `browserBuildDirectory` in `remix.config` ([#5702](https://github.com/remix-run/remix/pull/5702))
|
|
1447
|
+
|
|
1448
|
+
- Added deprecation warning for `CatchBoundary` in favor of `future.v2_errorBoundary` ([#5718](https://github.com/remix-run/remix/pull/5718))
|
|
1449
|
+
|
|
1450
|
+
- Added experimental support for Vanilla Extract caching, which can be enabled by setting `future.unstable_vanillaExtract: { cache: true }` in `remix.config`. This is considered experimental due to the use of a brand new Vanilla Extract compiler under the hood. In order to use this feature, you must be using at least `v1.10.0` of `@vanilla-extract/css`. ([#5735](https://github.com/remix-run/remix/pull/5735))
|
|
1451
|
+
|
|
1452
|
+
- Added deprecation warning for `serverBuildDirectory` in `remix.config` ([#5704](https://github.com/remix-run/remix/pull/5704))
|
|
1453
|
+
|
|
1454
|
+
### Patch Changes
|
|
1455
|
+
|
|
1456
|
+
- Fixed issue to ensure changes to CSS inserted via `@remix-run/css-bundle` are picked up during HMR ([#5823](https://github.com/remix-run/remix/pull/5823))
|
|
1457
|
+
- We now use `path.resolve` when re-exporting `entry.client` ([#5707](https://github.com/remix-run/remix/pull/5707))
|
|
1458
|
+
- Added support for `.mjs` and `.cjs` extensions when detecting CSS side-effect imports ([#5564](https://github.com/remix-run/remix/pull/5564))
|
|
1459
|
+
- Fixed resolution issues for pnpm users installing `react-refresh` ([#5637](https://github.com/remix-run/remix/pull/5637))
|
|
1460
|
+
- Added deprecation warning for `future.v2_meta` ([#5878](https://github.com/remix-run/remix/pull/5878))
|
|
1461
|
+
- Added optional entry file support for React 17 ([#5681](https://github.com/remix-run/remix/pull/5681))
|
|
1462
|
+
- Updated dependencies:
|
|
1463
|
+
- `@remix-run/server-runtime@1.15.0`
|
|
1464
|
+
|
|
1465
|
+
## 1.14.3
|
|
1466
|
+
|
|
1467
|
+
### Patch Changes
|
|
1468
|
+
|
|
1469
|
+
- dev server is resilient to build failures ([#5795](https://github.com/remix-run/remix/pull/5795))
|
|
1470
|
+
- Updated dependencies:
|
|
1471
|
+
- `@remix-run/server-runtime@1.14.3`
|
|
1472
|
+
|
|
1473
|
+
## 1.14.2
|
|
1474
|
+
|
|
1475
|
+
### Patch Changes
|
|
1476
|
+
|
|
1477
|
+
- remove premature deprecation warnings ([#5790](https://github.com/remix-run/remix/pull/5790))
|
|
1478
|
+
- Updated dependencies:
|
|
1479
|
+
- `@remix-run/server-runtime@1.14.2`
|
|
1480
|
+
|
|
1481
|
+
## 1.14.1
|
|
1482
|
+
|
|
1483
|
+
### Patch Changes
|
|
1484
|
+
|
|
1485
|
+
- Add types for importing `*.ico` files ([#5430](https://github.com/remix-run/remix/pull/5430))
|
|
1486
|
+
- Allow `moduleResolution: "bundler"` in tsconfig.json ([#5576](https://github.com/remix-run/remix/pull/5576))
|
|
1487
|
+
- Fix issue with x-route imports creating multiple entries in the module graph ([#5721](https://github.com/remix-run/remix/pull/5721))
|
|
1488
|
+
- Add `serverBuildTarget` deprecation warning ([#5624](https://github.com/remix-run/remix/pull/5624))
|
|
1489
|
+
- Updated dependencies:
|
|
1490
|
+
- `@remix-run/server-runtime@1.14.1`
|
|
1491
|
+
|
|
1492
|
+
## 1.14.0
|
|
1493
|
+
|
|
1494
|
+
### Minor Changes
|
|
1495
|
+
|
|
1496
|
+
- Hot Module Replacement and Hot Data Revalidation ([#5259](https://github.com/remix-run/remix/pull/5259))
|
|
1497
|
+
- Requires `unstable_dev` future flag to be enabled
|
|
1498
|
+
- HMR provided through React Refresh
|
|
1499
|
+
- Features:
|
|
1500
|
+
- HMR for component and style changes
|
|
1501
|
+
- HDR when loaders for current route change
|
|
1502
|
+
- Known limitations for MVP:
|
|
1503
|
+
- Only implemented for React via React Refresh
|
|
1504
|
+
- No `import.meta.hot` API exposed yet
|
|
1505
|
+
- Revalidates _all_ loaders on route when loader changes are detected
|
|
1506
|
+
- Loader changes do not account for imported dependencies changing
|
|
1507
|
+
- Make `entry.client` and `entry.server` files optional ([#4600](https://github.com/remix-run/remix/pull/4600))
|
|
1508
|
+
- we'll use a bundled version of each unless you provide your own
|
|
1509
|
+
|
|
1510
|
+
### Patch Changes
|
|
1511
|
+
|
|
1512
|
+
- Fixes flat route inconsistencies where `route.{ext}` wasn't always being treated like `index.{ext}` when used in a folder ([#5459](https://github.com/remix-run/remix/pull/5459))
|
|
1513
|
+
|
|
1514
|
+
- Route conflict no longer throw errors and instead display a helpful warning that we're using the first one we found.
|
|
1515
|
+
|
|
1516
|
+
```log
|
|
1517
|
+
⚠️ Route Path Collision: "/dashboard"
|
|
1518
|
+
|
|
1519
|
+
The following routes all define the same URL, only the first one will be used
|
|
1520
|
+
|
|
1521
|
+
🟢️️ routes/dashboard/route.tsx
|
|
1522
|
+
⭕️️ routes/dashboard.tsx
|
|
1523
|
+
```
|
|
1524
|
+
|
|
1525
|
+
```log
|
|
1526
|
+
⚠️ Route Path Collision: "/"
|
|
1527
|
+
|
|
1528
|
+
The following routes all define the same URL, only the first one will be used
|
|
1529
|
+
|
|
1530
|
+
🟢️️ routes/_landing._index.tsx
|
|
1531
|
+
⭕️️ routes/_dashboard._index.tsx
|
|
1532
|
+
⭕️ routes/_index.tsx
|
|
1533
|
+
```
|
|
1534
|
+
|
|
1535
|
+
- Log errors thrown during initial build in development. ([#5441](https://github.com/remix-run/remix/pull/5441))
|
|
1536
|
+
|
|
1537
|
+
- Sync `FutureConfig` interface between packages ([#5398](https://github.com/remix-run/remix/pull/5398))
|
|
1538
|
+
|
|
1539
|
+
- Add file loader for importing `.csv` files ([#3920](https://github.com/remix-run/remix/pull/3920))
|
|
1540
|
+
|
|
1541
|
+
- Updated dependencies:
|
|
1542
|
+
- `@remix-run/server-runtime@1.14.0`
|
|
1543
|
+
|
|
1544
|
+
## 1.13.0
|
|
1545
|
+
|
|
1546
|
+
### Minor Changes
|
|
1547
|
+
|
|
1548
|
+
- We are deprecating `serverBuildTarget` in `remix.config`. See the [release notes for v1.13.0](https://github.com/remix-run/remix/releases/tag/remix%401.13.0) for more information. ([#5354](https://github.com/remix-run/remix/pull/5354))
|
|
1549
|
+
- Add built-in support for PostCSS via the `future.unstable_postcss` feature flag ([#5229](https://github.com/remix-run/remix/pull/5229))
|
|
1550
|
+
- Add built-in support for Tailwind via the `future.unstable_tailwind` feature flag ([#5229](https://github.com/remix-run/remix/pull/5229))
|
|
1551
|
+
|
|
1552
|
+
### Patch Changes
|
|
1553
|
+
|
|
1554
|
+
- Mark Vanilla Extract files as side effects to ensure that files only containing global styles aren't tree-shaken ([#5246](https://github.com/remix-run/remix/pull/5246))
|
|
1555
|
+
- Support decorators in files using CSS side-effect imports ([#5305](https://github.com/remix-run/remix/pull/5305))
|
|
1556
|
+
- We made several Flat route fixes and enhancements. See the [release notes for v1.13.0](https://github.com/remix-run/remix/releases/tag/remix%401.13.0) for more information. ([#5228](https://github.com/remix-run/remix/pull/5228))
|
|
1557
|
+
- Updated dependencies:
|
|
1558
|
+
- `@remix-run/server-runtime@1.13.0`
|
|
1559
|
+
|
|
1560
|
+
## 1.12.0
|
|
1561
|
+
|
|
1562
|
+
### Minor Changes
|
|
1563
|
+
|
|
1564
|
+
- Added a new development server available in the Remix config under the `unstable_dev` flag. [See the release notes](https://github.com/remix-run/remix/releases/tag/remix%401.12.0) for a full description. ([#5133](https://github.com/remix-run/remix/pull/5133))
|
|
1565
|
+
|
|
1566
|
+
### Patch Changes
|
|
1567
|
+
|
|
1568
|
+
- Fixed issues with `v2_routeConvention` on Windows so that new and renamed files are properly included ([#5266](https://github.com/remix-run/remix/pull/5266))
|
|
1569
|
+
- Server build should not be removed in `remix watch` and `remix dev` ([#5228](https://github.com/remix-run/remix/pull/5228))
|
|
1570
|
+
- The dev server will now clean up build directories whenever a rebuild starts ([#5223](https://github.com/remix-run/remix/pull/5223))
|
|
1571
|
+
- Updated dependencies:
|
|
1572
|
+
- `@remix-run/server-runtime@1.12.0`
|
|
1573
|
+
|
|
1574
|
+
## 1.11.1
|
|
1575
|
+
|
|
1576
|
+
### Patch Changes
|
|
1577
|
+
|
|
1578
|
+
- Fixed a bug with `v2_routeConvention` that prevented `index` modules from being recognized for route paths ([`195291a3d`](https://github.com/remix-run/remix/commit/195291a3d8c0e098931199bcc26277a45cee0eb9))
|
|
1579
|
+
- Updated dependencies:
|
|
1580
|
+
- `@remix-run/server-runtime@1.11.1`
|
|
1581
|
+
|
|
1582
|
+
## 1.11.0
|
|
1583
|
+
|
|
1584
|
+
### Minor Changes
|
|
1585
|
+
|
|
1586
|
+
- Specify file loader for `.fbx`, `.glb`, `.gltf`, `.hdr`, and `.mov` files ([#5030](https://github.com/remix-run/remix/pull/5030))
|
|
1587
|
+
- Added support for [Vanilla Extract](https://vanilla-extract.style) via the `unstable_vanillaExtract` future flag. **IMPORTANT:** Features marked with `unstable` are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. ([#5040](https://github.com/remix-run/remix/pull/5040))
|
|
1588
|
+
- Add support for CSS side-effect imports via the `unstable_cssSideEffectImports` future flag. **IMPORTANT:** Features marked with `unstable` are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. ([#4919](https://github.com/remix-run/remix/pull/4919))
|
|
1589
|
+
- Add support for CSS Modules via the `unstable_cssModules` future flag. **IMPORTANT:** Features marked with `unstable` are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. ([#4852](https://github.com/remix-run/remix/pull/4852))
|
|
1590
|
+
|
|
1591
|
+
### Patch Changes
|
|
1592
|
+
|
|
1593
|
+
- Add new "flat" routing conventions. This convention will be the default in v2 but is available now under the `v2_routeConvention` future flag. ([#4880](https://github.com/remix-run/remix/pull/4880))
|
|
1594
|
+
- Added support for `handle` in MDX frontmatter ([#4865](https://github.com/remix-run/remix/pull/4865))
|
|
1595
|
+
- Updated dependencies:
|
|
1596
|
+
- `@remix-run/server-runtime@1.11.0`
|
|
1597
|
+
|
|
1598
|
+
## 1.10.1
|
|
1599
|
+
|
|
1600
|
+
### Patch Changes
|
|
1601
|
+
|
|
1602
|
+
- Update babel config to transpile down to node 14 ([#5047](https://github.com/remix-run/remix/pull/5047))
|
|
1603
|
+
- Updated dependencies:
|
|
1604
|
+
- `@remix-run/server-runtime@1.10.1`
|
|
1605
|
+
|
|
1606
|
+
## 1.10.0
|
|
1607
|
+
|
|
1608
|
+
### Patch Changes
|
|
1609
|
+
|
|
1610
|
+
- Fixed several issues with TypeScript to JavaScript conversion when running `create-remix` ([#4891](https://github.com/remix-run/remix/pull/4891))
|
|
1611
|
+
- Resolve asset entry full path to support monorepo import of styles ([#4855](https://github.com/remix-run/remix/pull/4855))
|
|
1612
|
+
- Updated dependencies:
|
|
1613
|
+
- `@remix-run/server-runtime@1.10.0`
|
|
1614
|
+
|
|
1615
|
+
## 1.9.0
|
|
1616
|
+
|
|
1617
|
+
### Minor Changes
|
|
1618
|
+
|
|
1619
|
+
- Allow defining multiple routes for the same route module file ([#3970](https://github.com/remix-run/remix/pull/3970))
|
|
1620
|
+
- Added support and conventions for optional route segments ([#4706](https://github.com/remix-run/remix/pull/4706))
|
|
1621
|
+
|
|
1622
|
+
### Patch Changes
|
|
1623
|
+
|
|
1624
|
+
- The Remix compiler now supports new Typescript 4.9 syntax (like the `satisfies` keyword) ([#4754](https://github.com/remix-run/remix/pull/4754))
|
|
1625
|
+
- Optimize `parentRouteId` lookup in `defineConventionalRoutes`. ([#4800](https://github.com/remix-run/remix/pull/4800))
|
|
1626
|
+
- Fixed a bug in `.ts` -> `.js` conversion on Windows by using a relative unix-style path ([#4718](https://github.com/remix-run/remix/pull/4718))
|
|
1627
|
+
- Updated dependencies:
|
|
1628
|
+
- `@remix-run/server-runtime@1.9.0`
|
|
1629
|
+
|
|
1630
|
+
## 1.8.2
|
|
1631
|
+
|
|
1632
|
+
### Patch Changes
|
|
1633
|
+
|
|
1634
|
+
- Updated dependencies:
|
|
1635
|
+
- `@remix-run/server-runtime@1.8.2`
|
|
1636
|
+
- `@remix-run/serve@1.8.2`
|
|
1637
|
+
|
|
1638
|
+
## 1.8.1
|
|
1639
|
+
|
|
1640
|
+
### Patch Changes
|
|
1641
|
+
|
|
1642
|
+
- Added a missing type definition for the Remix config `future` option to the `@remix-run/dev/server-build` virtual module ([#4771](https://github.com/remix-run/remix/pull/4771))
|
|
1643
|
+
- Updated dependencies:
|
|
1644
|
+
- `@remix-run/serve@1.8.1`
|
|
1645
|
+
- `@remix-run/server-runtime@1.8.1`
|
|
1646
|
+
|
|
1647
|
+
## 1.8.0
|
|
1648
|
+
|
|
1649
|
+
### Minor Changes
|
|
1650
|
+
|
|
1651
|
+
- Added support for a new route `meta` API to handle arrays of tags instead of an object. For details, check out the [RFC](https://github.com/remix-run/remix/discussions/4462). ([#4610](https://github.com/remix-run/remix/pull/4610))
|
|
1652
|
+
|
|
1653
|
+
### Patch Changes
|
|
1654
|
+
|
|
1655
|
+
- Importing functions and types from the `remix` package is deprecated, and all exported modules will be removed in the next major release. For more details,[see the release notes for 1.4.0](https://github.com/remix-run/remix/releases/tag/v1.4.0) where these changes were first announced. ([#4661](https://github.com/remix-run/remix/pull/4661))
|
|
1656
|
+
- Updated dependencies:
|
|
1657
|
+
- `@remix-run/server-runtime@1.8.0`
|
|
1658
|
+
- `@remix-run/serve@1.8.0`
|
|
1659
|
+
|
|
1660
|
+
## 1.7.6
|
|
1661
|
+
|
|
1662
|
+
### Patch Changes
|
|
1663
|
+
|
|
1664
|
+
- Updated dependencies:
|
|
1665
|
+
- `@remix-run/serve@1.7.6`
|
|
1666
|
+
- `@remix-run/server-runtime@1.7.6`
|
|
1667
|
+
|
|
1668
|
+
### Patch Changes
|
|
1669
|
+
|
|
1670
|
+
- Updated dependencies:
|
|
1671
|
+
- `@remix-run/serve@1.7.6-pre.0`
|
|
1672
|
+
- `@remix-run/server-runtime@1.7.6-pre.0`
|
|
1673
|
+
|
|
1674
|
+
## 1.7.5
|
|
1675
|
+
|
|
1676
|
+
### Patch Changes
|
|
1677
|
+
|
|
1678
|
+
- Updated dependencies:
|
|
1679
|
+
- `@remix-run/serve@1.7.5`
|
|
1680
|
+
- `@remix-run/server-runtime@1.7.5`
|
|
1681
|
+
|
|
1682
|
+
## 1.7.4
|
|
1683
|
+
|
|
1684
|
+
### Patch Changes
|
|
1685
|
+
|
|
1686
|
+
- Updated dependencies:
|
|
1687
|
+
- `@remix-run/server-runtime@1.7.4`
|
|
1688
|
+
- `@remix-run/serve@1.7.4`
|
|
1689
|
+
|
|
1690
|
+
## 1.7.3
|
|
1691
|
+
|
|
1692
|
+
### Patch Changes
|
|
1693
|
+
|
|
1694
|
+
- Update `create-remix` to use the new examples repository when using `--template example/<name>` ([#4208](https://github.com/remix-run/remix/pull/4208))
|
|
1695
|
+
- Add support for setting `moduleResolution` to `node`, `node16` or `nodenext` in `tsconfig.json`. ([#4034](https://github.com/remix-run/remix/pull/4034))
|
|
1696
|
+
- Add resources imported only by resource routes to `assetsBuildDirectory` ([#3841](https://github.com/remix-run/remix/pull/3841))
|
|
1697
|
+
- Ensure that any assets referenced in CSS files are hashed and copied to the `assetsBuildDirectory`. ([#4130](https://github.com/remix-run/remix/pull/4130))
|
|
1698
|
+
- Updated dependencies:
|
|
1699
|
+
- `@remix-run/serve@1.7.3`
|
|
1700
|
+
- `@remix-run/server-runtime@1.7.3`
|
|
1701
|
+
|
|
1702
|
+
## 1.7.2
|
|
1703
|
+
|
|
1704
|
+
### Patch Changes
|
|
1705
|
+
|
|
1706
|
+
- Updated dependencies:
|
|
1707
|
+
- `@remix-run/server-runtime@1.7.2`
|
|
1708
|
+
- `@remix-run/serve@1.7.2`
|
|
1709
|
+
|
|
1710
|
+
## 1.7.1
|
|
1711
|
+
|
|
1712
|
+
### Patch Changes
|
|
1713
|
+
|
|
1714
|
+
- Updated dependencies:
|
|
1715
|
+
- `@remix-run/server-runtime@1.7.1`
|
|
1716
|
+
- `@remix-run/serve@1.7.1`
|
|
1717
|
+
|
|
1718
|
+
## 1.7.0
|
|
1719
|
+
|
|
1720
|
+
### Minor Changes
|
|
1721
|
+
|
|
1722
|
+
- Added support for importing `.gql` and `.graphql` files as plain text ([#3923](https://github.com/remix-run/remix/pull/3923))
|
|
1723
|
+
- Added support for importing `.zip` and `.avif` files as resource URLs ([#3985](https://github.com/remix-run/remix/pull/3985))
|
|
1724
|
+
|
|
1725
|
+
### Patch Changes
|
|
1726
|
+
|
|
1727
|
+
- Removed our compiler's React shim in favor of esbuild's new automatic JSX transform ([#3860](https://github.com/remix-run/remix/pull/3860))
|
|
1728
|
+
- Updated dependencies:
|
|
1729
|
+
- `@remix-run/server-runtime@1.7.0`
|
|
1730
|
+
- `@remix-run/serve@1.7.0`
|
|
1731
|
+
|
|
1732
|
+
## 1.6.8
|
|
1733
|
+
|
|
1734
|
+
### Patch Changes
|
|
1735
|
+
|
|
1736
|
+
- Added support for `.mjs` and `.cjs` file extensions for `remix.config` ([#3675](https://github.com/remix-run/remix/pull/3675))
|
|
1737
|
+
- Added support for importing `.sql` files as text content ([#3190](https://github.com/remix-run/remix/pull/3190))
|
|
1738
|
+
- Updated the compiler to make MDX builds deterministic (and a little faster!) ([#3966](https://github.com/remix-run/remix/pull/3966))
|
|
1739
|
+
- Updated dependencies:
|
|
1740
|
+
- `@remix-run/server-runtime@1.6.8`
|
|
1741
|
+
- `@remix-run/serve@1.6.8`
|
|
1742
|
+
|
|
1743
|
+
## 1.6.7
|
|
1744
|
+
|
|
1745
|
+
### Patch Changes
|
|
1746
|
+
|
|
1747
|
+
- Remove logical nullish assignment, which is incompatible with Node v14. ([#3880](https://github.com/remix-run/remix/pull/3880))
|
|
1748
|
+
- Don't show ESM warnings when consumed via dynamic import. ([#3872](https://github.com/remix-run/remix/pull/3872))
|
|
1749
|
+
- Updated dependencies:
|
|
1750
|
+
- `@remix-run/serve@1.6.7`
|
|
1751
|
+
- `@remix-run/server-runtime@1.6.7`
|
|
1752
|
+
|
|
1753
|
+
## 1.6.6
|
|
1754
|
+
|
|
1755
|
+
### Patch Changes
|
|
1756
|
+
|
|
1757
|
+
- Write server build output files so that only assets imported from resource routes are written to disk ([#3817](https://github.com/remix-run/remix/pull/3817))
|
|
1758
|
+
- Add support for exporting links in `.mdx` files ([#3801](https://github.com/remix-run/remix/pull/3801))
|
|
1759
|
+
- Ensure that build hashing is deterministic ([#2027](https://github.com/remix-run/remix/pull/2027))
|
|
1760
|
+
- Fix types for `@remix-run/dev/server-build` virtual module ([#3743](https://github.com/remix-run/remix/pull/3743))
|
|
1761
|
+
- Updated dependencies:
|
|
1762
|
+
- `@remix-run/serve@1.6.6`
|
|
1763
|
+
- `@remix-run/server-runtime@1.6.6`
|
|
1764
|
+
|
|
1765
|
+
## 1.6.5
|
|
1766
|
+
|
|
1767
|
+
### Patch Changes
|
|
1768
|
+
|
|
1769
|
+
- Update `serverBareModulesPlugin` warning to use full import path ([#3656](https://github.com/remix-run/remix/pull/3656))
|
|
1770
|
+
- Fix broken `--port` flag in `create-remix` ([#3694](https://github.com/remix-run/remix/pull/3694))
|
|
1771
|
+
- Updated dependencies
|
|
1772
|
+
- `@remix-run/server-runtime`
|
|
1773
|
+
- `@remix-run/serve`
|