v1.16.1
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 loaders 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/--commandoption now has access tonode_modules/.binbinaries (#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/cssis installed (#6345) - lint: do not require display name in root route (#5450)
- types: Typesafe destructuring of
SessionStorage(#6330) - types:
V2_MetaFunctioncan beundefined(#6231) - Remix commands no longer modify
tsconfig(#6156) - re-export
useMatchfromreact-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