Repository navigation
Minor Changes
-
Render children into the document body or a custom container with the new
Portalcomponent fromremix/component. In server-rendered apps, portals must be nested within a client entry to render their content. StandalonecreateRoot()apps that don't usePortalorFramedon't download its renderer. (#12344) -
Deprecated
remix/data-table/sql-helpers. Custom adapters can continue importing from this path until Data Table removes it in its next major release. The new@remix-run/data-table/internal/sql-helpersentry point is reserved for the built-in adapters. (#12497) -
remix/routernow treatsrequest.signalcooperatively. When a request aborts, the router stops running middleware and handlers and rejects with the abort reason, but it waits for work already in progress instead of rejecting immediately. Passcontext.request.signalto work that should stop when the client disconnects, such asfetch()calls and database queries. See the@remix-run/fetch-routerchangelog for details. (#12446) -
Start Node.js HTTP and HTTPS servers with graceful shutdown and connection draining using
serve()fromremix/node-fetch-server, modeled afterBun.serve(). Callserver.stop()to wait for in-flight requests to finish while closing idle and speculative connections, orserver.stop(true)to close all active connections immediately. (#12491) -
Deprecated
limits.maxMatchWorkinMatcherOptions(MatcherLimits.maxMatchWork) fromremix/route-pattern. Rely on the built-in match work safeguard instead of configuringmaxMatchWork; passing it continues to work in3.xand will be removed in a future major release. (#12499)
Patch Changes
-
remixnow declares Bun 1.4.3 as its minimum supported Bun version inengines. Upgrade Bun to 1.4.3 or later before updating if you run Remix on Bun. (#12367) -
Updates to apps created with
remix new: (#12499)server.tsnow usesserve()fromremix/node-fetch-server, closing idle and speculative connections immediately onSIGINTorSIGTERMand draining active production requests for up to 30 seconds before shutting down.hmr.tsreports HMR port conflicts without starting the app server, avoiding secondaryEPIPEerrors.- The starter welcome page moves inline SVGs into
public/, simplifies the starter CSS andPromptButtoncomponent, clarifiesAGENTS.md, and updates the bundled Remix agent skill with modern browser UI guidance.
See the
@remix-run/clichangelog for details and thehmr.tsdiff to apply the port-conflict fix to an existing app. -
Rendering, hydration, and navigation fixes in
remix/component: (#12441)- Client navigations send the page being left as the
Referer, so servers that redirect back after a form post return to the right page. Links with an explicitreferrerpolicyand links or forms withrel="noreferrer"use native document navigation. - Frame form submissions keep the submit button's name and value when the button is disabled or removed during submission, including in Firefox.
- Back and Forward restore scroll positions more reliably in Safari and Firefox when the destination takes time to load.
- Reordering elements keeps focus, iframe documents, CSS animations, and open dialogs and popovers intact in browsers that support
moveBefore(). Custom elements that defineconnectedMoveCallback()receive it for these moves, and frame reloads that reorder surviving client entries or nested frames preserve input focus and selection. clientEntry()components passed as props or children to anotherclientEntry()now hydrate as independent client boundaries, keep their state and event handlers across outer updates and frame reloads, and load dynamically when rendered later on the client (such as inside closed dialogs or portals).- Components nested inside
clientEntry()props can now read context from a provider in the same props or fromhandle.context.set()on the client entry itself during server rendering. css()emits descriptor and definition at-rules (@property,@font-face,@counter-style,@font-palette-values,@page,@position-try) outside the generated class instead of dropping them, and renders object-valued nested selector keys that do not start with&,@,:,., or[(such ash2or'ul:hover &') as nested rules instead of[object Object].- Controls disabled in server HTML with
disabled=""stay disabled after hydration, and an element that replaces a hydrated empty string renders in the right position. - Inputs that render again with
value={undefined}orchecked={undefined}keep what the visitor typed or toggled. - Streamed child frames show their content as soon as it arrives, and a frame waiting for preloads no longer stays on its server HTML when a sibling finishes first.
See the
@remix-run/componentchangelog for the complete list. - Client navigations send the page being left as the
-
Client hydration and rendering in
remix/componentare faster, with no changes to app code. In our 4x CPU-throttled Chromium benchmarks, hydration is 2.1x–2.8x faster and client list and dashboard updates do 15%–30% less scripting work while preserving mismatch patching and DOM behavior. See the@remix-run/componentchangelog for details. (#12465) -
The
remix/componentbrowser runtime is smaller, with no changes to app code. In our measurements, a minimalcreateRoot()app is about 40% smaller minified and gzipped, and an app that hydrates withrun()is about 10% smaller. Standalone roots and navigation helpers such asnavigate()only load the code for the features they import, apps served unbundled byremix/assetsmake fewer module requests, and list, frame, and hydration updates do less work. See the@remix-run/componentchangelog for details. (#12441) -
Server rendering with
remix/component/server(renderToString()andrenderToStream()),remix/middleware/render, andremix/response/htmlis faster and uses less memory, with no changes to app code. In our benchmarks on Node 24,renderToString()throughput improves 2.4x–6.7x andrenderToStream()improves 1.1x–5.4x while producing identical HTML output, and streamed HTML responses avoid extra wrapper streams and forward stream cancellation to the underlying reader. See the@remix-run/component,@remix-run/render-middleware, and@remix-run/responsechangelogs for details. (#12457) -
SVG
xlinkHrefandxlink:hrefprops inremix/componentnow render as the SVG2hrefattribute instead of the namespacedxlink:hrefattribute. Other xlink props, such asxlinkTitle, are unchanged. Update any CSS selectors, tests, or scripts that look forxlink:hrefin rendered SVG. (#12441) -
Development and asset pipeline improvements in
remix/assets,remix/component-hmr, andremix/node-hmr: (#12441)remix/assetscompiles scripts and styles faster, bounds emitted script and style caches and releases intermediate state whenwatchisfalse, avoids spawning a duplicate file watcher under active browser HMR, and includesContent-Lengthon200/HEADresponses andCache-Controlon304responses.- Full-page HMR reloads in WebKit no longer render stale JavaScript after a module was preloaded, and idle browser HMR streams in
remix/node-hmrsend heartbeats every 30 seconds so HTTP clients and proxies do not time them out. - Component HMR handles default and destructured parameters, nested declarations, assignments during render, and components that share a variable declaration with other exports. Editing the setup of a component without retained setup bindings or parameters no longer runs its setup twice, and failed edits that throw or reject a top-level
awaitkeep the last working component implementation. - Source maps account for injected HMR setup code and component HMR transforms, and explicitly unmapped generated code no longer points at the preceding authored source after loader transforms or minification.
See the
@remix-run/assets,@remix-run/component-hmr, and@remix-run/node-hmrchangelogs for details. -
Other fixes and improvements: (#12441)
compressResponse()fromremix/response/compressand thecompression()middleware fromremix/middleware/compressionno longer buffer the entire compressed response in memory when the client reads slowly.detectMimeType()anddetectContentType()fromremix/mimeno longer throw for extensions that match inherited object properties, such asfile.constructor.object()andrecord()fromremix/data-schemano longer omit keys that passed validation from their results, and exportingobject()schemas without an explicit type annotation no longer fails TypeScript declaration emit (TS2883/TS4023).LazyBlobandLazyFilefromremix/lazy-filecan be read in supported browsers without nativeReadableStreamasync iteration, including Chrome and Edge 123 and Safari 17.5.createFetchProxy()fromremix/fetch-proxyremoves connection-specific headers (including fields named byConnection) from upstream responses, andremix/node-fetch-serveromits connection-specific headers on HTTP/2 responses while logging write failures and closing affected responses when an error response cannot be sent.remix/multipart-parserspeeds up boundary search on Bun and runtimes withoutBuffer, reduces per-upload setup work, speeds up parsing when part headers span multiple chunks, and handles headers atmaxHeaderSizeconsistently across chunk boundaries.
-
SuperHeadersfromremix/headersno longer wraps parsed header values in aProxy, improving read and mutation throughput and returning real class instances for collection headers (Accept,AcceptEncoding,AcceptLanguage,Cookie, andVary). Mutations that relied onProxytraps—deleteandObject.defineProperty()on typed fields, direct bracket-index assignment or.lengthtruncation on list accessors (setCookie,ifMatch.tags,ifNoneMatch.tags,range.ranges), and own-property enumeration (Object.keys(), object spread,JSON.stringify()) onSuperHeadersproperty wrappers—are no longer intercepted. Assignundefinedto clear typed fields and use standard array methods on list accessors: (#12499)-delete headers.contentType.charset -headers.setCookie[1] = { name: 'lang', value: 'en' } +headers.contentType.charset = undefined +headers.setCookie.splice(1, 1, { name: 'lang', value: 'en' })
See the
@remix-run/headerschangelog for details. -
The installed
node_modules/remix/INDEX.mdguide table now lists each guide's##section headings with line ranges so readers and coding agents can jump directly to the relevant section of a guide. (#12478) -
Stricter handling of untrusted input. Each of these rejects values that were previously accepted: (#12441)
remix/node-fetch-serverresponds with400 Bad Requestto requests with a literal backslash in the URL path. Percent-encoded backslashes are still accepted.createHref()fromremix/route-pattern/href, and thehref()method of routes fromremix/routes, throw aCreateHrefErrorwhen a pathname variable produces a standalone.or..segment, which could otherwise resolve to a different route.bigint()fromremix/data-schema/coercefails validation for strings longer than 4,096 characters.
-
Stop
loadModule()fromremix/node-tsx/load-moduleandremix test --coveragefrom printing amodule.register()deprecation warning (DEP0205) on Node.js 26. Both now register synchronous in-thread hooks withmodule.registerHooks(). See the@remix-run/node-tsxand@remix-run/testchangelogs for details. (#12466) -
Request and response handling in
remix/node-fetch-server(createRequestListener(),createRequest(), andsendResponse()) has higher throughput and lower per-request overhead. As part of this change,sendResponse()no longer releases its reader lock on the consumedresponse.bodystream, bodyless HTTP/1.x requests (Content-Length: 0or neitherContent-LengthnorTransfer-Encoding) now leaverequest.bodyasnullinstead of an empty stream, andcreateRequestListener()always constructs and passes aRequestto zero-argument or rest-parameter handlers while routing their errors throughonError. See the@remix-run/node-fetch-serverchangelog for details. (#12466) -
remix/routerdispatches requests significantly faster, especially for static routes and middleware chains, andremix/route-patternmatches large route tables 20 to 60 times faster, builds matchers 5 to 9 times faster, and generates hrefs up to nearly twice as fast in our benchmarks. Routing behavior is unchanged. See the@remix-run/fetch-routerand@remix-run/route-patternchangelogs for details. (#12441) -
Browser tests in
remix/testrun faster by reusing compiled scripts across test files. Firefox runs each test file in a top-level window so Back and Forward navigations behave as they do in the browser, and WebKit runs recover from the browser's history quota instead of failing later test files. See the@remix-run/testchangelog for details. (#12441) -
Bumped
@remix-run/*dependencies:assets@1.0.4async-context-middleware@1.0.2auth@1.0.3auth-middleware@1.0.3cli@1.0.4component@1.4.0component-hmr@1.0.3compression-middleware@1.0.4cookie@1.0.4cop-middleware@1.0.2cors-middleware@1.0.4csp-middleware@1.0.2csrf-middleware@1.0.3data-schema@1.0.2data-table@1.2.0data-table-mysql@1.1.1data-table-postgres@1.0.2data-table-sqlite@1.1.1fetch-proxy@1.0.4fetch-router@1.1.0file-storage@1.0.2file-storage-s3@1.1.2form-data-middleware@1.1.3form-data-parser@1.1.3fs@1.0.1headers@1.1.2lazy-file@5.0.9logger-middleware@1.0.2method-override-middleware@1.0.2mime@1.0.1multipart-parser@1.1.3node-fetch-server@1.1.0node-hmr@1.0.2node-tsx@1.0.1render-middleware@1.1.2response@1.0.4route-pattern@1.1.0session-middleware@1.0.4spa@1.0.4static-middleware@1.0.4test@1.2.1