v1.19.0
New Features
Improved Networking Options
When using the new v2_dev
server, the --scheme
and --host
options have been deprecated and replaced with the REMIX_DEV_ORIGIN
environment variable. For more information, refer to the v2 dev server docs (#6724)
ESBuild metafiles
For bundle analysis, the esbuild
metafiles are now written to your server build directory (build/
by default) and can be uploaded to https://esbuild.github.io/analyze/ for analysis (#6772):
metafile.css.json
metafile.js.json
(browser JS)metafile.server.json
(server JS)
New serverNodeBuiltinsPolyfill
Config Option
When building for non-Node.js server platforms, you can now control which polyfills are included (or disbale them entirely) by setting serverNodeBuiltinsPolyfill
in remix.config.js
(#6814, #6859, #6877).
// Disable all polyfills
exports.serverNodeBuiltinsPolyfill = { modules: {} };
// Enable specific polyfills
exports.serverNodeBuiltinsPolyfill = {
modules: {
crypto: true, // Provide a JSPM polyfill
fs: "empty", // Provide an empty polyfill
},
};
serverNodeBuiltinsPolyfill
. In v2, Remix will no longer include polyfills by default. You can prepare for your eventual migration by explicitly setting this config value in your v1 app.
Other Notable Changes
- Exclude unimplemented polyfills from server build for non-Node.js server platforms (#6814)
- Ignore missing
react-dom/client
for react 17 (#6725) - Warn if not using
v2_dev
(#6818)- Rename
--no-restart
to--manual
to match intention and documentation --no-restart
remains an alias for--manual
in v1 for backwards compatibility
- Rename
- Ignore errors when killing already dead processes (#6773)
- Fix sourcemaps for
v2_dev
(#6762) - Do not clear screen when dev server starts (#6719)
- On some terminal emulators, "clearing" only scrolls the next line to the top, while on others it erases the scrollback
- Instead, let users call
clear
themselves (clear && remix dev
) if they want to clear
- Always rewrite css-derived assets during builds (#6837)
- Fix router race condition for HMR (#6767)
- Properly handle
?_data
HTTP/Network errors that don't reach the Remix server and ensure they bubble to theErrorBoundary
(#6783) - Support proper hydration of
Error
subclasses such asReferenceError
/TypeError
in development mode (#6675) - Properly return a 404 for a
?_data
request that doesn't match any routes (#6820) - Narrowed the type of
fetcher.formEncType
to useFormEncType
fromreact-router-dom
instead ofstring
(#6810) - Deferred promises that return
undefined
/void
now surface a serialization error (#6793) - Avoid re-prefetching stylesheets for active routes during a revalidation (#6679)
- Add generic type for
useRouteLoaderData()
(#5157) - Submitted empty file inputs are now correctly parsed out as empty
File
instances instead of being surfaced as an empty string viarequest.formData()
(via@remix-run/web-fetch@4.3.5
) (#6816) - Added some missing
react-router-dom
exports to@remix-run/react
(createPath
,matchPath
, etc.) (#6856) - Updated React Router dependencies:
Changes by Package 🔗
@remix-run/cloudflare
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/node
@remix-run/react
@remix-run/server-runtime
@remix-run/testing
Full Changelog: 1.18.1...1.19.0