remix v3.0.0-rc.2
Pre-releasePre-release Changes
-
BREAKING CHANGE: Asset fingerprints from
remix/assetsnow use hashes of the final file contents. Replacefingerprint: { buildId }withfingerprint: true. If you use a persistentfiles.cache, move the build identifier tofiles.cacheKeyto keep reusing cached files across server restarts. See the asset server migration steps (see #11706). -
BREAKING CHANGE: Browser scripts served by
remix/assetsnow use import maps to resolve imports. Replace separategetHref()andgetPreloads()calls withgetScriptEntry(), and render<ImportMap value={importMap} />fromremix/ui/serverbefore the entry's preloads and module script.Apps with client entries or HMR should also configure
remix/multiple-import-maps-polyfillfor browsers that need support for import maps added at runtime. New apps include this setup. Existing apps should follow the asset server migration steps, including changes to custom rendering integrations (see #11706). -
BREAKING CHANGE:
remix/routernow returns405 Method Not Allowedwith anAllowheader when a URL matches a route but the request method does not. These requests previously reacheddefaultHandler, which returned 404 by default. Register anANYroute if you need a custom handler for every method at that URL.GETroutes now also serveHEADrequests with the same status and headers and an empty body. ExplicitHEADroutes still take precedence. See the router release notes (see #11767). -
BREAKING CHANGE: Custom browser HMR events from
remix/assetsandremix/node-hmrnow carry update data in adatarecord. Replace top-leveltimestampandupdatesfields with a named entry such asdata: { 'my-tool@1': { timestamp, updates } }.Apps using the standard asset server and
createBrowserHmrChannel()integration need no changes to their event handling. See the HMR migration example (see #11706). -
Added
remix/multiple-import-maps-polyfillto load and preload JavaScript modules that depend on import maps added at runtime.importModule()uses native imports in browsers with support and the polyfill in other browsers. See the usage guide (see #11706). -
Fixed scroll timing during frame navigation and history restoration in
remix/ui. Frames now show HTML validation and error responses with3xxor4xxstatus codes, and browsers withoutNavigateEvent.sourceElementsupport fall back to full document navigation. See the UI release notes. -
Bumped
@remix-run/*dependencies:assets@0.7.0async-context-middleware@0.3.6auth@0.3.1auth-middleware@0.2.6cli@0.7.0compression-middleware@0.1.14cop-middleware@0.1.9cors-middleware@0.1.9csrf-middleware@0.1.9data-table@0.5.1data-table-mysql@0.5.2data-table-postgres@0.5.2data-table-sqlite@0.6.2fetch-router@0.22.0form-data-middleware@0.3.6logger-middleware@0.3.6method-override-middleware@0.1.14multiple-import-maps-polyfill@0.1.0node-hmr@0.2.0render-middleware@0.3.0session-middleware@0.4.1spa@0.1.1static-middleware@0.4.15ui@0.9.0