v16.4.0-canary.22
- Add version for loaders api: #98377
- turbo-tasks-backend: let a GC pass wind down when it is blocking an operation: #96676
- docs: preserve Next.js development state: #98276
- Adds .resolve to loaders api: #98361
Huge thanks to @jimmyhmiller, @lukesandberg, and @aurorascharff for helping!
ui v0.9.0
-
Client entries can now provide import maps through
resolveClientEntry(). The<ImportMap>component fromremix/ui/servercombines your mappings with those from blocking client entries so the initial document contains one complete import map. New mappings from later frame responses are installed before their client entries load. Plain<script type="importmap">elements remain supported when you do not need to combine mappings (see #11706).When a frame response changes an installed import mapping or integrity value, Remix loads a fresh document so navigation after a deployment cannot mix old and new modules.
-
run()now accepts aprocessClientEntryPreloadscallback to handle preloads for client entries discovered after the initial page load. Use it withremix/multiple-import-maps-polyfillto preload modules in browsers that need the polyfill, returning an empty array to skip native modulepreload links. See the client entry setup example (see #11706).
-
handle.update()now warns and skips the extra render when called during component setup. Calls during rendering, or before the initial commit from outside setup, report a clear component error. Move these updates into an event handler or ahandle.queueTask()callback (see #11795). -
Fixed delayed scroll resets and history scroll restoration during frame navigation. Scroll now updates once the destination and its blocking frames first render, without waiting for the rest of the streamed content or client entry hydration. Also fixed scroll jumps in Chromium and stale or repeated scroll changes during redirects and overlapping reloads (see #11755).
Failed
frame.reload()calls no longer cause a second unhandled promise rejection when the caller already handles the error. -
Browsers without
NavigateEvent.sourceElementsupport now use full document navigation, so links and forms keep working when frame navigation is unavailable (see #11820). -
Frames now render HTML responses with
3xxand4xxstatus codes, so form validation messages and error pages appear in the frame when using the default resolver. HTML content types are now recognized regardless of case (see #11823).
method-override-middleware v0.1.14
- Bumped
@remix-run/*dependencies:
render-middleware v0.3.0
-
BREAKING CHANGE:
render({ assets })now usesassets.getScriptEntry()to resolve client entries from source files so their import maps are included in rendered documents and frame responses. Custom asset server implementations must providegetScriptEntry()instead ofgetHref()andgetPreloads(). It must return aPromiseresolving to the followingScriptEntryshape:interface ScriptEntry { href: string preloads: string[] importMap: { imports: Record<string, string> scopes?: Record<string, Record<string, string>> } }
Apps using
createAssetServer()receive this integration automatically. Custom rendering setups can follow the asset server migration steps (see #11706).
- Bumped
@remix-run/*dependencies:
static-middleware v0.4.15
- Bumped
@remix-run/*dependencies:
session-middleware v0.4.1
- Bumped
@remix-run/*dependencies:
multiple-import-maps-polyfill v0.1.0
-
Added
@remix-run/multiple-import-maps-polyfillfor loading JavaScript modules that depend on import maps added after the initial page load.importModule()detects browser support and uses native imports where possible.detectMultipleImportMapSupport()exposes the same support check, whileimportShim()andpreloadShim()always use the polyfill. Modules preloaded through the polyfill are reused by later imports (see #11706).importModule()resolves relative paths and import map scopes using itsparentUrlargument, which defaults to the document's base URL. See the usage guide for client entry and HMR setup, including Content Security Policy requirements.
logger-middleware v0.3.6
- Bumped
@remix-run/*dependencies:
node-hmr v0.2.0
-
BREAKING CHANGE: Custom browser HMR update events now carry JSON data in a
datarecord instead of top-leveltimestampandupdatesfields (see #11706).Apps using the standard asset server and
createBrowserHmrChannel()integration need no changes to their event handling. Give each tool a separate key in the record, for example{ type: 'update', data: { 'my-tool@1': { version: 1 } } }.node-hmrforwards this data unchanged to browser clients in a{ type: 'browser:update', data }event.channel.onFileEvents(async () => [ { type: 'update', - timestamp, - updates, + data: { 'my-tool@1': { timestamp, updates } }, }, ])
spa v0.1.1
- Bumped
@remix-run/*dependencies: