Continuing the work to stabilize features for v2, this release brings improvements to unstable_dev
as well as a bunch of bug fixes.
Dev server power-ups π¦Ύπ€
We've made two huge improvements to π₯ Hot Data Revalidation π₯ in 1.16.1! For anyone who needs a refresher on HDR, its like HMR but for your server code. In Remix, that primarily means tracking loader
changes.
In 1.16.0, Remix would trigger HDR even if only UI code had changed. Now in 1.16.1, Remix only triggers HDR when loader
s have changed. (#6278)
Also, in 1.16.1, Remix now detects code changes that affect your loader anywhere in your app code. You can modify the loader
itself, or a function that the loader
calls, or hardcoded data. Remix now only triggers HDR to fetch new data from routes with loader
changes. For example, if you changed your /products/$id
loader, but not your /products
loader, Remix only refetches data for /products/$id
. (#6299)
If you want to dive deeper into how it works and get a mental model for the new dev server with HDR, check out π₯ Pedro's talk at Remix Conf.
Dev server bug fixes
Thank you to everyone who's tried unstable_dev
β€οΈ .
You've given us invaluable feedback that let us identify and fix the following bugs:
- CSS-only changes now correctly trigger HMR (#6374)
- Fixed a regression that caused the old dev server to hang on rebuilds (#6295)
- Rebuilds no longer hang indefinitely for
unstable_dev
(#6294, #6295) - Fixed
No loader for {.svg,.png, etc...}
during HDR (#6396) - App server port no longer conflicts during rebuilds (#6289)
- Windows:
-c
/--command
option now has access tonode_modules/.bin
binaries (#6310) - Windows: App server process in no longer orphaned when dev server exits (#6395)
- Windows: Changes in route files are now detected correctly for HMR/HDR (#6293)
Other notable changes
- css: handle css imports in js files with jsx (#6309)
- css: only process
.css.{js,ts}
if@vanilla-extract/css
is installed (#6345) - lint: do not require display name in root route (#5450)
- types: Typesafe destructuring of
SessionStorage
(#6330) - types:
V2_MetaFunction
can beundefined
(#6231) - Remix commands no longer modify
tsconfig
(#6156) - re-export
useMatch
fromreact-router-dom
(#5257) - Updated React Router dependencies to the latest versions:
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.16.0...1.16.1