@react-router/dev
March 19, 2025 ยท View on GitHub
7.4.0
Minor Changes
- Generate types for
virtual:react-router/server-buildmodule (#13152)
Patch Changes
- When
future.unstable_splitRouteModulesis set to"enforce", allow both splittable and unsplittable root route exports since it's always in a single chunk. (#13238) - When
future.unstable_viteEnvironmentApiis enabled, allow plugins that override the default SSR environment (such as@cloudflare/vite-plugin) to be placed before or after the React Router plugin. (#13183) - Fix conflicts with other Vite plugins that use the
configureServerand/orconfigurePreviewServerhooks (#13184) - Updated dependencies:
react-router@7.4.0@react-router/node@7.4.0@react-router/serve@7.4.0
7.3.0
Patch Changes
-
Fix support for custom client
build.rollupOptions.output.entryFileNames(#13098) -
Fix usage of
prerenderoption whenserverBundlesoption has been configured or provided by a preset, e.g.vercelPresetfrom@vercel/react-router(#13082) -
Fix support for custom
build.assetsDir(#13077) -
Remove unused dependencies (#13134)
-
Stub all routes except root in "SPA Mode" server builds to avoid issues when route modules or their dependencies import non-SSR-friendly modules (#13023)
-
Fix errors with
future.unstable_viteEnvironmentApiwhen thessrenvironment has been configured by another plugin to be a customVite.DevEnvironmentrather than the defaultVite.RunnableDevEnvironment(#13008) -
Remove unused Vite file system watcher (#13133)
-
Fix support for custom SSR build input when
serverBundlesoption has been configured (#13107)Note that for consumers using the
future.unstable_viteEnvironmentApiandserverBundlesoptions together, hyphens are no longer supported in server bundle IDs since they also need to be valid Vite environment names. -
Fix dev server when using HTTPS by stripping HTTP/2 pseudo headers from dev server requests (#12830)
-
Lazy load Cloudflare platform proxy on first dev server request when using the
cloudflareDevProxyVite plugin to avoid creating unnecessary workerd processes (#13016) -
When
future.unstable_viteEnvironmentApiis enabled and thessrenvironment hasoptimizeDeps.noDiscoverydisabled, defineoptimizeDeps.entriesandoptimizeDeps.include(#13007) -
Fix duplicated entries in typegen for layout routes and their corresponding index route (#13140)
-
Updated dependencies:
react-router@7.3.0@react-router/node@7.3.0@react-router/serve@7.3.0
7.2.0
Minor Changes
-
Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the
/route withssr:false(#12948)- If you specify
ssr:falsewithout aprerenderconfig, this is considered "SPA Mode" and the generatedindex.htmlfile will only render down to the root route and will be able to hydrate for any valid application path - If you specify
ssr:falsewith aprerenderconfig but do not include the/path (i.e.,prerender: ['/blog/post']), then we still generate a "SPA Mode"index.htmlfile that can hydrate for any path in the application - However, previously if you specified
ssr:falseand included the/path in yourprerenderconfig, we would prerender the/route intoindex.htmlas a non-SPA page- The generated HTML would include the root index route which prevented hydration for any other paths
- With this change, we now generate a "SPA Mode" file in
__spa-fallback.htmlthat will allow you to hydrate for any non-prerendered paths - You can serve this file from your static file server for any paths that would otherwise 404 if you only want to pre-render some routes in your
ssr:falseapp and serve the others as a SPA npx sirv-cli build/client --single __spa-fallback.html
- If you specify
-
Allow a
loaderin the root route in SPA mode because it can be called/server-rendered at build time (#12948)Route.HydrateFallbackPropsnow also receivesloaderData- This will be defined so long as the
HydrateFallbackis rendering while children routes are loading - This will be
undefinedif theHydrateFallbackis rendering because the route has it's own hydratingclientLoader - In SPA mode, this will allow you to render loader root data into the SPA
index.html
- This will be defined so long as the
-
New type-safe
hrefutility that guarantees links point to actual paths in your app (#13012)import { href } from "react-router"; export default function Component() { const link = href("/blog/:slug", { slug: "my-first-post" }); return ( <main> <Link to={href("/products/:id", { id: "asdf" })} /> <NavLink to={href("/:lang?/about", { lang: "en" })} /> </main> ); }
Patch Changes
-
Handle custom
envDirin Vite config (#12969) -
Fix typegen for repeated params (#13012)
In React Router, path parameters are keyed by their name. So for a path pattern like
/a/:id/b/:id?/c/:id, the last:idwill set the value foridinuseParamsand theparamsprop. For example,/a/1/b/2/c/3will result in the value{ id: 3 }at runtime.Previously, generated types for params incorrectly modeled repeated params with an array. So
/a/1/b/2/c/3generated a type like{ id: [1,2,3] }.To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters. So
/a/1/b/2/c/3now generates a type like{ id: 3 }. -
Fix CLI parsing to allow argumentless
npx react-routerusage (#12925) -
Fix
ArgError: unknown or unexpected option: --versionwhen runningreact-router --version(#13012) -
Skip action-only resource routes when using
prerender:true(#13004) -
Enhance invalid export detection when using
ssr:false(#12948)headers/actionare prohibited in all routes withssr:falsebecause there will be no runtime server on which to run themloaderfunctions are more nuanced and depend on whether a given route is prerendered- When using
ssr:falsewithout aprerenderconfig, only therootroute can have aloader- This is "SPA mode" which generates a single
index.htmlfile with the root routeHydrateFallbackso it is capable of hydrating for any path in your application - therefore we can only call a root routeloaderat build time
- This is "SPA mode" which generates a single
- When using
ssr:falsewith aprerenderconfig, you can export aloaderfrom routes matched by one of theprerenderpaths because those routes will be server rendered at build time- Exporting a
loaderfrom a route that is never matched by aprerenderpath will throw a build time error because there will be no runtime server to ever run the loader
- Exporting a
- When using
-
Limit prerendered resource route
.datafiles to only the target route (#13004) -
Add unstable support for splitting route modules in framework mode via
future.unstable_splitRouteModules(#11871) -
Fix prerendering of binary files (#13039)
-
Add
future.unstable_viteEnvironmentApiflag to enable experimental Vite Environment API support (#12936) -
Disable Lazy Route Discovery for all
ssr:falseapps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured__manifestrequests (#12894)- We previously only disabled this for "SPA Mode" which is
ssr:falseand noprerenderconfig but we realized it should apply to allssr:falseapps, including those prerendering multiple pages - In those
prerenderscenarios we would prerender the/__manifestfile assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
- We previously only disabled this for "SPA Mode" which is
-
Updated dependencies:
react-router@7.2.0@react-router/node@7.2.0@react-router/serve@7.2.0
7.1.5
Patch Changes
- Updated dependencies:
react-router@7.1.5@react-router/node@7.1.5@react-router/serve@7.1.5
7.1.4
Patch Changes
- Properly resolve Windows file paths to scan for Vite's dependency optimization when using the
unstable_optimizeDepsfuture flag. (#12637) - Fix prerendering when using a custom server - previously we ended up trying to import the users custom server when we actually want to import the virtual server build module (#12759)
- Updated dependencies:
react-router@7.1.4@react-router/node@7.1.4@react-router/serve@7.1.4
7.1.3
Patch Changes
- Fix
revealandroutesCLI commands (#12745) - Updated dependencies:
react-router@7.1.3@react-router/node@7.1.3@react-router/serve@7.1.3
7.1.2
Patch Changes
- Fix default external conditions in Vite v6. This fixes resolution issues with certain npm packages. (#12644)
- Fix mismatch in prerendering html/data files when path is missing a leading slash (#12684)
- Use
module-syncserver condition when enabled in the runtime. This fixes React context mismatches (e.g.useHref() may be used only in the context of a <Router> component.) during development on Node 22.10.0+ when using libraries that have a peer dependency on React Router. (#12729) - Fix react-refresh source maps (#12686)
- Updated dependencies:
react-router@7.1.2@react-router/node@7.1.2@react-router/serve@7.1.2
7.1.1
Patch Changes
- Fix for a crash when optional args are passed to the CLI (
5b1ca202f) - Updated dependencies:
react-router@7.1.1@react-router/node@7.1.1@react-router/serve@7.1.1
7.1.0
Minor Changes
- Add support for Vite v6 (#12469)
Patch Changes
-
Properly initialize
NODE_ENVif not already set for compatibility with React 19 (#12578) -
Remove the leftover/unused
abortDelayprop fromServerRouterand update the defaultentry.server.tsxto use the newstreamTimeoutvalue for Single Fetch (#12478)- The
abortDelayfunctionality was removed in v7 as it was coupled to thedeferimplementation from Remix v2, but this removal of this prop was missed - If you were still using this prop in your
entry.serverfile, it's likely your app is not aborting streams as you would expect and you will need to adopt the newstreamTimeoutvalue introduced with Single Fetch
- The
-
Updated dependencies:
react-router@7.1.0@react-router/node@7.1.0@react-router/serve@7.1.0
7.0.2
Patch Changes
-
Support
moduleResolutionNode16andNodeNext(#12440) -
Generate wide
matchesandparamstypes for current route and child routes (#12397)At runtime,
matchesincludes child route matches andparamsinclude child route path parameters. But previously, we only generated types for parent routes inmatches; forparams, we only considered the parent routes and the current route. To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information. -
Updated dependencies:
react-router@7.0.2@react-router/node@7.0.2@react-router/serve@7.0.2
7.0.1
Patch Changes
- Pass route error to ErrorBoundary as a prop (#12338)
- Ensure typegen file watcher is cleaned up when Vite dev server restarts (#12331)
- Updated dependencies:
react-router@7.0.1@react-router/node@7.0.1@react-router/serve@7.0.1
7.0.0
Major Changes
-
For Remix consumers migrating to React Router, the
vitePluginandcloudflareDevProxyVitePluginexports have been renamed and moved. (#11904)-import { - vitePlugin as remix, - cloudflareDevProxyVitePlugin, -} from "@remix/dev"; +import { reactRouter } from "@react-router/dev/vite"; +import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; -
Remove single_fetch future flag. (#11522)
-
update minimum node version to 18 (#11690)
-
Add
exportsfield to all packages (#11675) -
node package no longer re-exports from react-router (#11702)
-
For Remix consumers migrating to React Router who used the Vite plugin's
buildEndhook, the resolvedreactRouterConfigobject no longer contains apublicPathproperty since this belongs to Vite, not React Router. (#11575) -
For Remix consumers migrating to React Router, the Vite plugin's
manifestoption has been removed. (#11573)The
manifestoption been superseded by the more powerfulbuildEndhook since it's passed thebuildManifestargument. You can still write the build manifest to disk if needed, but you'll most likely find it more convenient to write any logic depending on the build manifest within thebuildEndhook itself.If you were using the
manifestoption, you can replace it with abuildEndhook that writes the manifest to disk like this:// react-router.config.ts import type { Config } from "@react-router/dev/config"; import { writeFile } from "node:fs/promises"; export default { async buildEnd({ buildManifest }) { await writeFile( "build/manifest.json", JSON.stringify(buildManifest, null, 2), "utf-8" ); }, } satisfies Config; -
Consolidate types previously duplicated across
@remix-run/router,@remix-run/server-runtime, and@remix-run/reactnow that they all live inreact-router(#12177)- Examples:
LoaderFunction,LoaderFunctionArgs,ActionFunction,ActionFunctionArgs,DataFunctionArgs,RouteManifest,LinksFunction,Route,EntryRoute - The
RouteManifesttype used by the "remix" code is now slightly stricter because it is using the former@remix-run/routerRouteManifestRecord<string, Route> -> Record<string, Route | undefined>
- Removed
AppDatatype in favor of inliningunknownin the few locations it was used - Removed
ServerRuntimeMeta*types in favor of theMeta*types they were duplicated from
- Examples:
-
Update default
isbotversion to v5 and drop support forisbot@3(#11770)- If you have
isbot@4orisbot@5in yourpackage.json:- You do not need to make any changes
- If you have
isbot@3in yourpackage.jsonand you have your ownentry.server.tsxfile in your repo- You do not need to make any changes
- You can upgrade to
isbot@5independent of the React Router v7 upgrade
- If you have
isbot@3in yourpackage.jsonand you do not have your ownentry.server.tsxfile in your repo- You are using the internal default entry provided by React Router v7 and you will need to upgrade to
isbot@5in yourpackage.json
- You are using the internal default entry provided by React Router v7 and you will need to upgrade to
- If you have
-
Drop support for Node 18, update minimum Node vestion to 20 (#12171)
- Remove
installGlobals()as this should no longer be necessary
- Remove
-
For Remix consumers migrating to React Router, Vite manifests (i.e.
.vite/manifest.json) are now written within each build subdirectory, e.g.build/client/.vite/manifest.jsonandbuild/server/.vite/manifest.jsoninstead ofbuild/.vite/client-manifest.jsonandbuild/.vite/server-manifest.json. This means that the build output is now much closer to what you'd expect from a typical Vite project. (#11573)Originally the Remix Vite plugin moved all Vite manifests to a root-level
build/.vitedirectory to avoid accidentally serving them in production, particularly from the client build. This was later improved with additional logic that deleted these Vite manifest files at the end of the build process unless Vite'sbuild.manifesthad been enabled within the app's Vite config. This greatly reduced the risk of accidentally serving the Vite manifests in production since they're only present when explicitly asked for. As a result, we can now assume that consumers will know that they need to manage these additional files themselves, and React Router can safely generate a more standard Vite build output.
Minor Changes
-
Params, loader data, and action data as props for route component exports (#11961)
export default function Component({ params, loaderData, actionData }) {} export function HydrateFallback({ params }) {} export function ErrorBoundary({ params, loaderData, actionData }) {} -
Remove internal entry.server.spa.tsx implementation (#11681)
-
Add
prefixroute config helper to@react-router/dev/routes(#12094) -
Typesafety improvements (#12019)
React Router now generates types for each of your route modules. You can access those types by importing them from
./+types.<route filename without extension>. For example:// app/routes/product.tsx import type * as Route from "./+types.product"; export function loader({ params }: Route.LoaderArgs) {} export default function Component({ loaderData }: Route.ComponentProps) {}This initial implementation targets type inference for:
Params: Path parameters from your routing config inroutes.tsincluding file-based routingLoaderData: Loader data fromloaderand/orclientLoaderwithin your route moduleActionData: Action data fromactionand/orclientActionwithin your route module
In the future, we plan to add types for the rest of the route module exports:
meta,links,headers,shouldRevalidate, etc. We also plan to generate types for typesafeLinks:<Link to="/products/:id" params={{ id: 1 }} /> // ^^^^^^^^^^^^^ ^^^^^^^^^ // typesafe `to` and `params` based on the available routes in your appCheck out our docs for more:
Patch Changes
- Enable prerendering for resource routes (#12200)
- chore: warn instead of error for min node version in CLI (#12270)
- chore: re-enable development warnings through a
developmentexports condition. (#12269) - include root "react-dom" module for optimization (#12060)
- resolve config directory relative to flat output file structure (#12187)
- if we are in SAP mode, always render the
index.htmlfor hydration (#12268) - fix(react-router): (v7) fix static prerender of non-ascii characters (#12161)
- Updated dependencies:
react-router@7.0.0@react-router/serve@7.0.0@react-router/node@7.0.0
2.9.0
Minor Changes
-
New
future.unstable_singleFetchflag (#8773)- Naked objects returned from loaders/actions are no longer automatically converted to JSON responses. They'll be streamed as-is via
turbo-streamsoDate's will becomeDatethroughuseLoaderData() - You can return naked objects with
Promise's without needing to usedefer()- including nestedPromise's- If you need to return a custom status code or custom response headers, you can still use the
deferutility
- If you need to return a custom status code or custom response headers, you can still use the
<RemixServer abortDelay>is no longer used. Instead, you shouldexport const streamTimeoutfromentry.server.tsxand the remix server runtime will use that as the delay to abort the streamed response- If you export your own streamTimeout, you should decouple that from aborting the react
renderToPipeableStream. You should always ensure that react is aborted afer the stream is aborted so that abort rejections can be flushed down
- If you export your own streamTimeout, you should decouple that from aborting the react
- Actions no longer automatically revalidate on 4xx/5xx responses (via RR
future.unstable_skipActionErrorRevalidationflag) - you can return a 2xx to opt-into revalidation or useshouldRevalidate
- Naked objects returned from loaders/actions are no longer automatically converted to JSON responses. They'll be streamed as-is via
Patch Changes
- Improve
getDependenciesToBundleresolution in monorepos (#8848) - Fix SPA mode when single fetch is enabled by using streaming entry.server (#9063)
- Vite: added sourcemap support for transformed routes (#8970)
- Update links printed to the console by the Remix CLI/Dev Server to point to updated docs locations (#9176)
- Updated dependencies:
@remix-run/node@2.9.0@remix-run/server-runtime@2.9.0
2.8.1
Patch Changes
- Support reading from Vite config when running
remix revealandremix routesCLI commands (#8916) - Add Vite commands to Remix CLI
--helpoutput (#8939) - Vite: Fix support for
build.sourcemapoption in Vite config (#8965) - Clean up redundant client route query strings on route JavaScript files in production builds (#8969)
- Vite: Fix error when using Vite's
server.fs.allowoption without a client entry file (#8966) - Updated dependencies:
@remix-run/node@2.8.1@remix-run/server-runtime@2.8.1
2.8.0
Minor Changes
- Pass resolved
viteConfigto Remix Vite plugin'sbuildEndhook (#8885)
Patch Changes
- Mark
Layoutas browser safe route export inesbuildcompiler (#8842) - Vite: Silence build warnings when dependencies include "use client" directives (#8897)
- Vite: Fix
serverBundlesissue where multiple browser manifests are generated (#8864) - Support custom Vite
build.assetsDiroption (#8843) - Updated dependencies:
@remix-run/node@2.8.0@remix-run/server-runtime@2.8.0
2.7.2
Patch Changes
- Vite: Fix error when building projects with
.css?urlimports (#8829) - Updated dependencies:
@remix-run/node@2.7.2@remix-run/server-runtime@2.7.2
2.7.1
Patch Changes
- Updated dependencies:
@remix-run/node@2.7.1@remix-run/server-runtime@2.7.1
2.7.0
Minor Changes
-
Allow an optional
Layoutexport from the root route (#8709) -
Vite: Cloudflare Proxy as a Vite plugin (#8749)
This is a breaking change for projects relying on Cloudflare support from the unstable Vite plugin
The Cloudflare preset (
unstable_cloudflarePreset) as been removed and replaced with a new Vite plugin:import { unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + cloudflareDevProxyVitePlugin as remixCloudflareDevProxy, } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ + remixCloudflareDevProxy(), + remix(), - remix({ - presets: [cloudflare()], - }), ], - ssr: { - resolve: { - externalConditions: ["workerd", "worker"], - }, - }, });remixCloudflareDevProxymust come before theremixplugin so that it can override Vite's dev server middleware to be compatible with Cloudflare's proxied environment.Because it is a Vite plugin,
remixCloudflareDevProxycan setssr.resolve.externalConditionsto beworkerd-compatible for you.remixCloudflareDevProxyaccepts agetLoadContextfunction that replaces the oldgetRemixDevLoadContext. If you were using anightlyversion that requiredgetBindingsProxyorgetPlatformProxy, that is no longer required. Any options you were passing togetBindingsProxyorgetPlatformProxyshould now be passed toremixCloudflareDevProxyinstead.This API also better aligns with future plans to support Cloudflare with a framework-agnostic Vite plugin that makes use of Vite's (experimental) Runtime API.
-
Vite: Stabilize the Remix Vite plugin, Cloudflare preset, and all related types by removing all
unstable_/Unstable_prefixes. (#8713)While this is a breaking change for existing Remix Vite plugin consumers, now that the plugin has stabilized, there will no longer be any breaking changes outside of a major release. Thank you to all of our early adopters and community contributors for helping us get here! ๐
-
Vite: Stabilize "SPA Mode" by renaming the Remix vite plugin config from
unstable_ssr -> ssr(#8692) -
Vite: Add a new
basenameoption to the Vite plugin, allowing users to set the internal React Routerbasenamein order to to serve their applications underneath a subpath (#8145)
Patch Changes
-
Vite: fix server exports dead-code elimination for routes outside of app directory (#8795)
-
Always prepend DOCTYPE in SPA mode entry.server.tsx, can opt out via remix reveal (#8725)
-
Fix build issue in SPA mode when using a
basename(#8720) -
Vite: Validate that the MDX Rollup plugin, if present, is placed before Remix in Vite config (#8690)
-
Vite: reliably detect non-root routes in Windows (#8806)
Sometimes route
filewill be unnormalized Windows path with\instead of/. -
Vite: Pass
remixUserConfigto presetremixConfighook (#8797) -
Vite: Fix issue resolving critical CSS during development when the current working directory differs from the project root (#8752)
-
Vite: Ensure CSS file URLs that are only referenced in the server build are available on the client (#8796)
-
Vite: Require version 5.1.0 to support
.css?urlimports (#8723) -
Fix type error in Remix config for synchronous
routesfunction (#8745) -
Vite: Support Vite v5.1.0's
.css?urlimports (#8684) -
Always ignore route files starting with
.(#8801) -
Vite: Enable use of
vite previewto preview Remix SPA applications (#8624)- In the SPA template,
npm run starthas been renamed tonpm run previewwhich usesvite previewinstead of a standalone HTTP server such ashttp-serverorserv-cli
- In the SPA template,
-
Vite: Remove the ability to pass
publicPathas an option to the Remix vite plugin (#8145)- โ ๏ธ This is a breaking change for projects using the unstable Vite plugin with a
publicPath - This is already handled in Vite via the
baseconfig so we now set the RemixpublicPathfrom the Vitebaseconfig
- โ ๏ธ This is a breaking change for projects using the unstable Vite plugin with a
-
Vite: Fix issue where client route file requests fail if search params have been parsed and serialized before reaching the Remix Vite plugin (#8740)
-
Vite: Enable HMR for .md and .mdx files (#8711)
-
Updated dependencies:
@remix-run/server-runtime@2.7.0@remix-run/node@2.7.0
2.6.0
Minor Changes
- Add
future.v3_throwAbortReasonflag to throwrequest.signal.reasonwhen a request is aborted instead of anErrorsuch asnew Error("query() call aborted: GET /path")(#8251)
Patch Changes
-
Vite: Add
manifestoption to Vite plugin to enable writing a.remix/manifest.jsonfile to the build directory (#8575)This is a breaking change for consumers of the Vite plugin's "server bundles" feature.
The
build/server/bundles.jsonfile has been superseded by the more generalbuild/.remix/manifest.json. While the old server bundles manifest was always written to disk when generating server bundles, the build manifest file must be explicitly enabled via themanifestoption. -
Vite: Provide
Unstable_ServerBundlesFunctionandUnstable_VitePluginConfigtypes (#8654) -
Vite: add
--sourcemapClientand--sourcemapServerflags toremix vite:build(#8613)-
--sourcemapClient -
--sourcemapClient=inline -
--sourcemapClient=hidden -
--sourcemapServer -
--sourcemapServer=inline -
--sourcemapServer=hidden
See https://vitejs.dev/config/build-options.html#build-sourcemap
-
-
Vite: Validate IDs returned from the
serverBundlesfunction to ensure they only contain alphanumeric characters, hyphens and underscores (#8598) -
Vite: fix "could not fast refresh" false alarm (#8580)
HMR is already functioning correctly but was incorrectly logging that it "could not fast refresh" on internal client routes. Now internal client routes correctly register Remix exports like
metafor fast refresh, which removes the false alarm. -
Vite: Cloudflare Pages support (#8531)
To get started with Cloudflare, you can use the [
unstable-vite-cloudflare][template-vite-cloudflare] template:npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflareOr read the new docs at Future > Vite > Cloudflare and Future > Vite > Migrating > Migrating Cloudflare Functions.
-
Vite: Remove undocumented backwards compatibility layer for Vite v4 (#8581)
-
Vite: rely on Vite plugin ordering (#8627)
This is a breaking change for projects using the unstable Vite plugin.
The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first. For example, that means putting the MDX plugin before the Remix plugin:
import mdx from "@mdx-js/rollup"; import { unstable_vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ + mdx(), remix() - mdx(), ], });Previously, the Remix plugin misused
enforce: "post"from Vite's plugin API to ensure that it ran last. However, this caused other unforeseen issues. Instead, we now rely on standard Vite semantics for plugin ordering.The official Vite React SWC plugin also relies on plugin ordering for MDX.
-
Vite: Add
presetsoption to ease integration with different platforms and tools. (#8514) -
Vite: Remove interop with
<LiveReload />, rely on<Scripts />instead (#8636)This is a breaking change for projects using the unstable Vite plugin.
Vite provides a robust client-side runtime for development features like HMR, making the
<LiveReload />component obsolete.In fact, having a separate dev scripts component was causing issues with script execution order. To work around this, the Remix Vite plugin used to override
<LiveReload />into a bespoke implementation that was compatible with Vite.Instead of all this indirection, now the Remix Vite plugin instructs the
<Scripts />component to automatically include Vite's client-side runtime and other dev-only scripts.import { - LiveReload, Outlet, Scripts, } export default function App() { return ( <html> <head> </head> <body> <Outlet /> <Scripts /> - <LiveReload /> </body> </html> ) } -
Vite: Add
buildEndhook (#8620) -
Vite: add dev load context option to Cloudflare preset (#8649)
-
Vite: Add
modefield into generated server build (#8539) -
Vite: Only write Vite manifest files if
build.manifestis enabled within the Vite config (#8599)This is a breaking change for consumers of Vite's
manifest.jsonfiles.To explicitly enable generation of Vite manifest files, you must set
build.manifesttotruein your Vite config.export default defineConfig({ build: { manifest: true }, // ... }); -
Vite: reduce network calls for route modules during HMR (#8591)
-
Vite: Add new
buildDirectoryoption with a default value of"build". This replaces the oldassetsBuildDirectoryandserverBuildDirectoryoptions which defaulted to"build/client"and"build/server"respectively. (#8575)This is a breaking change for consumers of the Vite plugin that were using the
assetsBuildDirectoryandserverBuildDirectoryoptions.The Remix Vite plugin now builds into a single directory containing
clientandserverdirectories. If you've customized your build output directories, you'll need to migrate to the newbuildDirectoryoption, e.g.import { unstable_vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ remix({ - serverBuildDirectory: "dist/server", - assetsBuildDirectory: "dist/client", + buildDirectory: "dist", }) ], }); -
Vite: Remove
unstableprefix fromserverBundlesoption. (#8596) -
Vite: Write Vite manifest files to
build/.vitedirectory rather than being nested withinbuild/clientandbuild/serverdirectories. (#8599)This is a breaking change for consumers of Vite's
manifest.jsonfiles.Vite manifest files are now written to the Remix build directory. Since all Vite manifests are now in the same directory, they're no longer named
manifest.json. Instead, they're namedbuild/.vite/client-manifest.jsonandbuild/.vite/server-manifest.json, orbuild/.vite/server-{BUNDLE_ID}-manifest.jsonwhen using server bundles. -
Updated dependencies:
@remix-run/server-runtime@2.6.0@remix-run/node@2.6.0
2.5.1
Patch Changes
- Add
isSpaModeto@remix-run/dev/server-buildvirtual module (#8492) - Automatically prepend
<!DOCTYPE html>if not present to fix quirks mode warnings for SPA template (#8495) - Vite: Errors for server-only code point to new docs (#8488)
- Vite: Fix HMR race condition when reading changed file contents (#8479)
- Vite: Tree-shake unused route exports in the client build (#8468)
- Vite: Performance profiling (#8493)
- Run
remix vite:build --profileto generate a.cpuprofilethat can be shared or uploaded to speedscope.app - In dev, press
p + enterto start a new profiling session or stop the current session - If you need to profile dev server startup, run
remix vite:dev --profileto initialize the dev server with a running profiling session - For more, see the new docs: Vite > Performance
- Run
- Vite: Improve performance of dev server requests by invalidating Remix's virtual modules on relevant file changes rather than on every request (#8164)
- Updated dependencies:
@remix-run/node@2.5.1@remix-run/server-runtime@2.5.1
2.5.0
Minor Changes
-
Add unstable support for "SPA Mode" (#8457)
You can opt into SPA Mode by setting
unstable_ssr: falsein your Remix Vite plugin config:// vite.config.ts import { unstable_vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [remix({ unstable_ssr: false })], });Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:
remix vite:devBuilding in SPA Mode will generate an
index.htmlfile in your client assets directory:remix vite:buildTo run your SPA, you serve your client assets directory via an HTTP server:
npx http-server build/clientFor more information, please refer to the SPA Mode docs.
-
Add
unstable_serverBundlesoption to Vite plugin to support splitting server code into multiple request handlers. (#8332)This is an advanced feature designed for hosting provider integrations. When compiling your app into multiple server bundles, there will need to be a custom routing layer in front of your app directing requests to the correct bundle. This feature is currently unstable and only designed to gather early feedback.
Example usage:
import { unstable_vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ remix({ unstable_serverBundles: ({ branch }) => { const isAuthenticatedRoute = branch.some( (route) => route.id === "routes/_authenticated" ); return isAuthenticatedRoute ? "authenticated" : "unauthenticated"; }, }), ], });
Patch Changes
-
Fix issue with
isbotv4 released on 1/1/2024 (#8415)remix devwill now add"isbot": "^4"topackage.jsoninstead of usinglatest- Update built-in
entry.serverfiles to work with bothisbot@3andisbot@4for backwards-compatibility with Remix apps that have pinnedisbotto v3 - Templates are updated to use
isbot@4moving forward viacreate-remix
-
Vite: Fix HMR issues when altering exports for non-rendered routes (#8157)
-
Vite: Default
NODE_ENVto"production"when runningremix vite:buildcommand (#8405) -
Vite: Remove Vite plugin config option
serverBuildPathin favor of separateserverBuildDirectoryandserverBuildFileoptions (#8332) -
Vite: Loosen strict route exports restriction, reinstating support for non-Remix route exports (#8420)
-
Updated dependencies:
@remix-run/server-runtime@2.5.0@remix-run/node@2.5.0
2.4.1
Patch Changes
-
Vite: Error messages when
.serverfiles are referenced by client (#8267)- Previously, referencing a
.servermodule from client code resulted in an error message like:The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'
- This was confusing because
answer.server.tsdoes provide theisDateTypeexport, but Remix was replacing.servermodules with empty modules (export {}) for the client build - Now, Remix explicitly fails at compile time when a
.servermodule is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route module - The error messages also include links to relevant documentation
- Previously, referencing a
-
Remove
unstable_viteServerBuildModuleIdin favor of manually referencing virtual module name"virtual:remix/server-build". (#8264)This is a breaking change for projects using the unstable Vite plugin with a custom server.
This change was made to avoid issues where
@remix-run/devcould be inadvertently required in your server's production dependencies.Instead, you should manually write the virtual module name
"virtual:remix/server-build"when callingssrLoadModulein development.-import { unstable_viteServerBuildModuleId } from "@remix-run/dev"; // ... app.all( "*", createRequestHandler({ build: vite - ? () => vite.ssrLoadModule(unstable_viteServerBuildModuleId) + ? () => vite.ssrLoadModule("virtual:remix/server-build") : await import("./build/server/index.js"), }) ); -
Vite: Fix errors for non-existent
index.htmlimporter (#8353) -
Add
vite:devandvite:buildcommands to the Remix CLI. (#8211)In order to handle upcoming Remix features where your plugin options can impact the number of Vite builds required, you should now run your Vite
devandbuildprocesses via the Remix CLI.{ "scripts": { - "dev": "vite dev", - "build": "vite build && vite build --ssr" + "dev": "remix vite:dev", + "build": "remix vite:build" } } -
Vite: Preserve names for exports from
.clientmodules (#8200)Unlike
.servermodules, the main idea is not to prevent code from leaking into the server build since the client build is already public. Rather, the goal is to isolate the SSR render from client-only code. Routes need to import code from.clientmodules without compilation failing and then rely on runtime checks or otherwise ensure that execution only happens within a client-only context (e.g. event handlers,useEffect).Replacing
.clientmodules with empty modules would cause the build to fail as ESM named imports are statically analyzed. So instead, we preserve the named export but replace each exported value withundefined. That way, the import is valid at build time and standard runtime checks can be used to determine if the code is running on the server or client. -
Disable watch mode in Vite child compiler during build (#8342)
-
Vite: Show warning when source maps are enabled in production build (#8222)
-
Updated dependencies:
@remix-run/server-runtime@2.4.1@remix-run/node@2.4.1
2.4.0
Minor Changes
-
Vite: exclude modules within
.serverdirectories from client build (#8154) -
Add support for
clientLoader/clientAction/HydrateFallbackroute exports (RFC) (#8173)Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as:
- Leveraging a data source local to the browser (i.e.,
localStorage) - Managing a client-side cache of server data (like
IndexedDB) - Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
- Migrating a React Router SPA to a Remix application
By default,
clientLoaderwill not run on hydration, and will only run on subsequent client side navigations.If you wish to run your client loader on hydration, you can set
clientLoader.hydrate=trueto force Remix to execute it on initial page load. Keep in mind that Remix will still SSR your route component so you should ensure that there is no new required data being added by yourclientLoader.If your
clientLoaderneeds to run on hydration and adds data you require to render the route component, you can export aHydrateFallbackcomponent that will render during SSR, and then your route component will not render until theclientLoaderhas executed on hydration.clientActionis simpler thanclientLoaderbecause it has no hydration use-cases.clientActionwill only run on client-side navigations.For more information, please refer to the
clientLoaderandclientActiondocumentation. - Leveraging a data source local to the browser (i.e.,
-
Vite: Strict route exports (#8171)
With Vite, Remix gets stricter about which exports are allowed from your route modules. Previously, the Remix compiler would allow any export from routes. While this was convenient, it was also a common source of bugs that were hard to track down because they only surfaced at runtime.
For more, see https://remix.run/docs/en/main/future/vite#strict-route-exports
-
Add a new
future.v3_relativeSplatPathflag to implement a breaking bug fix to relative routing when inside a splat route. For more information, please see the React Router6.21.0Release Notes and theuseResolvedPathdocs. (#8216)
Patch Changes
-
Upgrade Vite peer dependency range to v5 (#8172)
-
Support HMR for routes with
handleexport in Vite dev (#8022) -
Fix flash of unstyled content for non-Express custom servers in Vite dev (#8076)
-
Bundle CSS imported in client entry file in Vite plugin (#8143)
-
Change Vite build output paths to fix a conflict between how Vite and the Remix compiler each manage the
publicdirectory. (#8077)This is a breaking change for projects using the unstable Vite plugin.
The server is now compiled into
build/serverrather thanbuild, and the client is now compiled intobuild/clientrather thanpublic.For more information on the changes and guidance on how to migrate your project, refer to the updated Remix Vite documentation.
-
Remove undocumented
legacyCssImportsoption from Vite plugin due to issues with?urlimports of CSS files not being processed correctly in Vite (#8096) -
Vite: fix access to default
entry.{client,server}.tsxwithin pnpm workspace on Windows (#8057) -
Remove
unstable_createViteServerandunstable_loadViteServerBuildwhich were only minimal wrappers around Vite'screateServerandssrLoadModulefunctions when using a custom server. (#8120)This is a breaking change for projects using the unstable Vite plugin with a custom server.
Instead, we now provide
unstable_viteServerBuildModuleIdso that custom servers interact with Vite directly rather than via Remix APIs, for example:-import { - unstable_createViteServer, - unstable_loadViteServerBuild, -} from "@remix-run/dev"; +import { unstable_viteServerBuildModuleId } from "@remix-run/dev";Creating the Vite server in middleware mode:
const vite = process.env.NODE_ENV === "production" ? undefined - : await unstable_createViteServer(); + : await import("vite").then(({ createServer }) => + createServer({ + server: { + middlewareMode: true, + }, + }) + );Loading the Vite server build in the request handler:
app.all( "*", createRequestHandler({ build: vite - ? () => unstable_loadViteServerBuild(vite) + ? () => vite.ssrLoadModule(unstable_viteServerBuildModuleId) : await import("./build/server/index.js"), }) ); -
Pass request handler errors to
vite.ssrFixStacktracein Vite dev to ensure stack traces correctly map to the original source code (#8066) -
Vite: Preserve names for exports from .client imports (#8200)
Unlike
.servermodules, the main idea is not to prevent code from leaking into the server build since the client build is already public. Rather, the goal is to isolate the SSR render from client-only code. Routes need to import code from.clientmodules without compilation failing and then rely on runtime checks to determine if the code is running on the server or client.Replacing
.clientmodules with empty modules would cause the build to fail as ESM named imports are statically analyzed. So instead, we preserve the named export but replace each exported value with an empty object. That way, the import is valid at build time and the standard runtime checks can be used to determine if then code is running on the server or client. -
Add
@remix-run/nodeto Vite'soptimizeDeps.includearray (#8177) -
Improve Vite plugin performance (#8121)
- Parallelize detection of route module exports
- Disable
server.preTransformRequestsin Vite child compiler since it's only used to process route modules
-
Remove automatic global Node polyfill installation from the built-in Vite dev server and instead allow explicit opt-in. (#8119)
This is a breaking change for projects using the unstable Vite plugin without a custom server.
If you're not using a custom server, you should call
installGlobalsin your Vite config instead.import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { installGlobals } from "@remix-run/node"; import { defineConfig } from "vite"; +installGlobals(); export default defineConfig({ plugins: [remix()], }); -
Vite: Errors at build-time when client imports .server default export (#8184)
Remix already stripped .server file code before ensuring that server code never makes it into the client. That results in errors when client code tries to import server code, which is exactly what we want! But those errors were happening at runtime for default imports. A better experience is to have those errors happen at build-time so that you guarantee that your users won't hit them.
-
Fix
request instanceof Requestchecks when using Vite dev server (#8062) -
Updated dependencies:
@remix-run/server-runtime@2.4.0@remix-run/node@2.4.0
2.3.1
Patch Changes
- Support
nonceprop onLiveReloadcomponent in Vite dev (#8014) - Ensure code-split JS files in the server build's assets directory aren't cleaned up after Vite build (#8042)
- Fix redundant copying of assets from
publicdirectory in Vite build (#8039)- This ensures that static assets aren't duplicated in the server build directory
- This also fixes an issue where the build would break if
assetsBuildDirectorywas deeply nested within thepublicdirectory
- Updated dependencies:
@remix-run/node@2.3.1@remix-run/server-runtime@2.3.1
2.3.0
Patch Changes
- Support rendering of
LiveReloadcomponent afterScriptsin Vite dev (#7919) - fix(vite): fix "react-refresh/babel" resolution for custom server with pnpm (#7904)
- Support JSX usage in
.jsxfiles without manualReactimport in Vite (#7888) - Support optional rendering of
LiveReloadcomponent in Vite dev (#7919) - Fix Vite production builds when plugins that have different local state between
developmentandproductionmodes are present, e.g.@mdx-js/rollup. (#7911) - Cache resolution of Remix Vite plugin options (#7908)
- Support Vite 5 (#7846)
- Allow
process.env.NODE_ENVvalues other than"development"in Vite dev (#7980) - Attach CSS from shared chunks to routes in Vite build (#7952)
- fix(vite): Let Vite handle serving files outside of project root via
/@fs(#7913)- This fixes errors when using default client entry or server entry in a pnpm project where those files may be outside of the project root, but within the workspace root.
- By default, Vite prevents access to files outside the workspace root (when using workspaces) or outside of the project root (when not using workspaces) unless user explicitly opts into it via Vite's
server.fs.allow.
- Improve performance of LiveReload proxy in Vite dev (#7883)
- fix(vite): deduplicate
@remix-run/react(#7926)- Pre-bundle Remix dependencies to avoid Remix router duplicates.
- Our remix-react-proxy plugin does not process default client and
- server entry files since those come from within
node_modules. - That means that before Vite pre-bundles dependencies (e.g. first time dev server is run) mismatching Remix routers cause
Error: You must render this element inside a <Remix> element.
- Fix React Fast Refresh error on load when using
deferin Vite dev server (#7842) - Handle multiple "Set-Cookie" headers in Vite dev server (#7843)
- Fix flash of unstyled content on initial page load in Vite dev when using a custom Express server (#7937)
- Emit assets that were only referenced in the server build into the client assets directory in Vite build (#7892, cherry-picked in
8cd31d65) - Populate
process.envfrom.envfiles on the server in Vite dev (#7958) - Fix
FutureConfigtype (#7895) - Updated dependencies:
@remix-run/server-runtime@2.3.0@remix-run/node@2.3.0
2.2.0
Minor Changes
- Unstable Vite support for Node-based Remix apps (#7590)
remix build๐vite build && vite build --ssrremix dev๐vite dev- Other runtimes (e.g. Deno, Cloudflare) not yet supported.
- See "Future > Vite" in the Remix Docs for details
- Add a new
future.v3_fetcherPersistflag to change the persistence behavior of fetchers. Instead of being immediately cleaned up when unmounted in the UI, fetchers will persist until they return to anidlestate (RFC) (#7704)- For more details, please refer to the React Router 6.18.0 release notes
Patch Changes
- Updated dependencies:
@remix-run/server-runtime@2.2.0@remix-run/node@2.2.0
2.1.0
Patch Changes
- Sourcemap takes into account special chars in output file (#7574)
- Updated dependencies:
@remix-run/server-runtime@2.1.0
2.0.1
Patch Changes
- Fix types for MDX files when using pnpm (#7491)
- Update
getDependenciesToBundleto handle ESM packages without main exports (#7272)- Note that these packages must expose
package.jsonin theirexportsfield so that their path can be resolved
- Note that these packages must expose
- Fix server builds where
serverBuildPathextension is.cjs(#7180) - Updated dependencies:
@remix-run/server-runtime@2.0.1
2.0.0
Major Changes
-
The
create-remixCLI has been rewritten to feature a cleaner interface, Git repo initialization and optionalremix.initscript execution. The interactive template prompt and official Remix stack/template shorthands have also been removed so that community/third-party templates are now on a more equal footing. (#6887)- The code for
create-remixhas been moved out of the Remix CLI since it's not intended for use within an existing Remix application - This means that the
remix createcommand is no longer available.
- The code for
-
Enable built-in PostCSS and Tailwind support by default. (#6909)
- These tools are now automatically used within the Remix compiler if PostCSS and/or Tailwind configuration files are present in your project.
- If you have a custom PostCSS and/or Tailwind setup outside of Remix, you can disable these features in your
remix.config.jsvia thepostcss:falseand/ortailwind:falseflags
-
Drop React 17 support (#7121)
-
Require Node >=18.0.0 (#6939)
-
Compile server build to Node 18 (#7292)
- This allows features like top-level
awaitto be used within a Remix app
- This allows features like top-level
-
Remove default Node.js polyfills - you must now opt-into polyfills via the
serverNodeBuiltinsPolyfillandbrowserNodeBuiltinsPolyfillconfigs (#7269) -
Remove
v2_errorBoundaryflag andCatchBoundaryimplementation (#6906) -
Remove
v2_normalizeFormMethodfuture flag - allformMethodvalues will be normalized in v2 (#6875) -
Remove
v2_routeConventionflag - the flat route file convention is now standard (#6969) -
Remove
v2_headersflag - it is now the default behavior to use the deepestheadersfunction in the route tree (#6979) -
The route
metaAPI now defaults to the new "V2 Meta" API (#6958)- Please refer to the (docs and Preparing for V2 guide for more information.
-
Default to
serverModuleFormat: "esm"and updateremix-serveto use dynamic import to support ESM and CJS build outputs (#6949) -
Remove
serverBuildTargetconfig option (#6896) -
Remove deprecated
REMIX_DEV_HTTP_ORIGINenv var - useREMIX_DEV_ORIGINinstead (#6963) -
Remove
devServerBroadcastDelayconfig option (#7063) -
Remove deprecated
devServerPortoption - use--port/dev.portinstead (#7078) -
Remove deprecated
REMIX_DEV_SERVER_WS_PORTenv var - useremix dev's '--port/portoption instead (#6965) -
Stop passing
isTypeScripttoremix.initscript (#7099) -
Remove
replace-remix-magic-importscodemod (#6899) -
Remove deprecated
--no-restart/restartcli args/flags - use--manual/manualinstead (#6962) -
Remove deprecated
--scheme/schemeand--host/hostcli args/flags - useREMIX_DEV_ORIGINinstead (#6962) -
Promote the
future.v2_devflag inremix.config.jsto a root leveldevconfig (#7002) -
Remove
browserBuildDirectoryconfig option (#6900) -
Remove
serverBuildDirectoryconfig option ([#6897](https://github.com/remix-run/remix/pull/- Removecodemodcommand (#6918) 6897)) -
Removed support for "magic exports" from the
remixpackage. This package can be removed from yourpackage.jsonand you should update all imports to use the source@remix-run/*packages: (#6895)- import type { ActionArgs } from "remix"; - import { json, useLoaderData } from "remix"; + import type { ActionArgs } from "@remix-run/node"; + import { json } from "@remix-run/node"; + import { useLoaderData } from "@remix-run/react";
Minor Changes
-
Warn users about obsolete future flags in
remix.config.js(#7048) -
Detect built mode via
build.mode(#6964)- Prevents mode mismatch between built Remix server entry and user-land server
- Additionally, all runtimes (including non-Node runtimes) can use
build.modeto determine if HMR should be performed
-
Support
bunpackage manager (#7074) -
The
serverNodeBuiltinsPolyfilloption (along with the newly addedbrowserNodeBuiltinsPolyfill) now supports defining global polyfills in addition to module polyfills (#7269)-
For example, to polyfill Node's
Bufferglobal:module.exports = { serverNodeBuiltinsPolyfill: { globals: { Buffer: true, }, // You'll probably need to polyfill the "buffer" module // too since the global polyfill imports this: modules: { buffer: true, }, }, };
-
Patch Changes
-
Fix importing of PNGs, SVGs, and other assets from packages in
node_modules(#6813, #7182) -
Decouple the
@remix-run/devpackage from the contents of the@remix-run/css-bundlepackage. (#6982)- The contents of the
@remix-run/css-bundlepackage are now entirely managed by the Remix compiler - Even though it's still recommended that your Remix dependencies all share the same version, this change ensures that there are no runtime errors when upgrading
@remix-run/devwithout upgrading@remix-run/css-bundle
- The contents of the
-
Allow non-development modes for
remix watch(#7117) -
Stop
remix devwhenesbuildis not running (#7158) -
Do not interpret JSX in
.tsfiles (#7306)-
While JSX is supported in
.jsfiles for compatibility with existing apps and libraries,.tsfiles should not contain JSX. By not interpreting.tsfiles as JSX,.tsfiles can contain single-argument type generics without needing a comma to disambiguate from JSX:// this works in .ts files const id = <T>(x: T) => x; // ^ single-argument type generic// this doesn't work in .tsx files const id = <T,>(x: T) => x; // ^ is this a JSX element? or a single-argument type generic?// this works in .tsx files const id = <T,>(x: T) => x; // ^ comma: this is a generic, not a JSX element const component = <h1>hello</h1>; // ^ no comma: this is a JSX element
-
-
Enhance obsolete flag warning for
future.v2_devif it was an object, and prompt users to lift it to the rootdevconfig (#7427) -
Allow decorators in app code (#7176)
-
Allow JSX in
.jsfiles during HMR (#7112) -
Kill app server when remix dev terminates (#7280)
-
Support dependencies that import polyfill packages for Node built-ins via a trailing slash (e.g. importing the
bufferpackage withvar Buffer = require('buffer/').Bufferas recommended in their README) (#7198)- These imports were previously marked as external
- This meant that they were left as dynamic imports in the client bundle and would throw a runtime error in the browser (e.g.
Dynamic require of "buffer/" is not supported)
-
Surface errors when PostCSS config is invalid (#7391)
-
Restart dev server when Remix config changes (#7269)
-
Remove outdated ESM import warnings (#6916)
- Most of the time these warnings were false positives.
- Instead, we now rely on built-in Node warnings for ESM imports.
-
Do not trigger rebuilds when
.DS_Storechanges (#7172) -
Remove warnings for stabilized flags: (#6905)
unstable_cssSideEffectImportsunstable_cssModulesunstable_vanillaExtract
-
Allow any mode (
NODE_ENV) (#7113) -
Replace the deprecated
xdmpackage with@mdx-js/mdx(#4054) -
Write a
version.txtsentinel file after server build is completely written (#7299) -
Updated dependencies:
@remix-run/server-runtime@2.0.0
1.19.3
Patch Changes
- Show deprecation warning when using
devServerBroadcastDelayanddevServerPortconfig options (#7064) - Updated dependencies:
@remix-run/server-runtime@1.19.3
1.19.2
Patch Changes
- Update
proxy-agentto resolve npm audit security vulnerability (#7027) - Updated dependencies:
@remix-run/server-runtime@1.19.2
1.19.1
Patch Changes
- Add a heartbeat ping to prevent the WebSocket connection from being closed due to inactivity when using a proxy like Cloudflare (#6904, #6927)
- Treeshake out HMR code from production builds (#6894)
- Updated dependencies:
@remix-run/server-runtime@1.19.1
1.19.0
Minor Changes
-
improved networking options for
v2_dev(#6724)deprecate the
--schemeand--hostoptions and replace them with theREMIX_DEV_ORIGINenvironment variable -
Output esbuild metafiles for bundle analysis (#6772)
Written to server build directory (
build/by default):metafile.css.jsonmetafile.js.json(browser JS)metafile.server.json(server JS)
Metafiles can be uploaded to https://esbuild.github.io/analyze/ for analysis.
-
Add
serverNodeBuiltinsPolyfillconfig option. Inremix.config.jsyou can now disable polyfills of Node.js built-in modules for non-Node.js server platforms, or opt into a subset of polyfills. (#6814, #6859, #6877)// Disable all polyfills exports.serverNodeBuiltinsPolyfill = { modules: {} }; // Enable specific polyfills exports.serverNodeBuiltinsPolyfill = { modules: { crypto: true, // Provide a JSPM polyfill fs: "empty", // Provide an empty polyfill }, };
Patch Changes
-
ignore missing react-dom/client for react 17 (#6725)
-
Warn if not using
v2_dev(#6818)Also, rename
--no-restartto--manualto match intention and documentation.--no-restartremains an alias for--manualin v1 for backwards compatibility. -
ignore errors when killing already dead processes (#6773)
-
Always rewrite css-derived assets during builds (#6837)
-
fix sourcemaps for
v2_dev(#6762) -
Do not clear screen when dev server starts (#6719)
On some terminal emulators, "clearing" only scrolls the next line to the top. on others, it erases the scrollback.
Instead, let users call
clearthemselves (clear && remix dev) if they want to clear. -
Updated dependencies:
@remix-run/server-runtime@1.19.0
1.18.1
Patch Changes
- Ignore missing
react-dom/clientfor React 17 (#6725) - Updated dependencies:
@remix-run/server-runtime@1.18.1
1.18.0
Minor Changes
Patch Changes
- fix docs links for msw and mkcert (#6672)
- fix
remix dev -c: kill all descendant processes of specified command when restarting (#6663) - Add caching to regular stylesheet compilation (#6638)
- Rename
Architect (AWS Lambda)->Architectin thecreate-remixCLI to avoid confusion for other methods of deploying to AWS (i.e., SST) (#6484) - Improve CSS bundle build performance by skipping unused Node polyfills (#6639)
- Improve performance of CSS bundle build by skipping compilation of Remix/React packages that are known not to contain CSS imports (#6654)
- Cache CSS side-effect imports transform when using HMR (#6622)
- Fix bug with pathless layout routes beneath nested path segments (#6649)
- Add caching to PostCSS for CSS Modules (#6604)
- Add caching to PostCSS for side-effect imports (#6554)
- cache getRouteModuleExports calls to significantly speed up build and HMR rebuild times (#6629)
- group rebuild logs with surrounding whitespace (#6607)
- instructions for integrating with msw (#6669)
- Update minimum version of
esbuild-plugins-node-modules-polyfillto 1.0.16 to ensure that the plugin is cached (#6652) - Updated dependencies:
@remix-run/server-runtime@1.18.0
1.17.1
Patch Changes
- Replace
esbuild-plugin-polyfill-nodewithesbuild-plugins-node-modules-polyfill(#6562) - Lazily generate CSS bundle when import of
@remix-run/css-bundleis detected (#6535) - Updated dependencies:
@remix-run/server-runtime@1.17.1
1.17.0
Minor Changes
-
built-in tls support (#6483)
New options:
--tls-key/tlsKey: TLS key--tls-cert/tlsCert: TLS Certificate
If both TLS options are set,
schemedefaults tohttpsExample
Install mkcert and create a local CA:
brew install mkcert mkcert -installThen make sure you inform
nodeabout your CA certs:export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"๐ You'll probably want to put that env var in your scripts or
.bashrc/.zshrcNow create
key.pemandcert.pem:mkcert -key-file key.pem -cert-file cert.pem localhostSee
mkcertdocs for more details.Finally, pass in the paths to the key and cert via flags:
remix dev --tls-key=key.pem --tls-cert=cert.pemor via config:
module.exports = { future: { unstable_dev: { tlsKey: "key.pem", tlsCert: "cert.pem", }, }, };That's all that's needed to set up the Remix Dev Server with TLS.
๐จ Make sure to update your app server for TLS as well.
For example, with
express:import fs from "node:fs"; import https from "node:https"; import express from "express"; const app = express(); // ...code setting up your express app... const appServer = https.createServer( { key: fs.readFileSync("key.pem"), cert: fs.readFileSync("cert.pem"), }, app ); appServer.listen(3000, () => { console.log("Ready on https://localhost:3000"); });Known limitations
remix-servedoes not yet support TLS. That means this only works for custom app server using the-cflag for now. -
Reuse dev server port for WebSocket (Live Reload,HMR,HDR) (#6476)
As a result the
webSocketPort/--websocket-portoption has been obsoleted. Additionally, scheme/host/port options for the dev server have been renamed.Available options are:
Option flag config default Command -c/--commandcommandremix-serve <server build path>Scheme --schemeschemehttpHost --hosthostlocalhostPort --portportDynamically chosen open port No restart --no-restartrestart: falserestart: trueNote that scheme/host/port options are for the dev server, not your app server. You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL).
Patch Changes
-
Add caching to PostCSS for regular stylesheets (#6505)
-
Fix warnings when importing CSS files with
future.unstable_devenabled (#6506) -
Fix Tailwind performance issue when
postcss.config.jscontainsplugins: { tailwindcss: {} }andremix.config.jscontains bothtailwind: trueandpostcss: true. (#6468)Note that this was not an issue when the plugin function had been explicitly called, i.e.
plugins: [tailwindcss()]. Remix avoids adding the Tailwind plugin to PostCSS if it's already present but we were failing to detect when the plugin function hadn't been called โ either because the plugin function itself had been passed, i.e.plugins: [require('tailwindcss')], or the plugin config object syntax had been used, i.e.plugins: { tailwindcss: {} }. -
Faster server export removal for routes when
unstable_devis enabled. (#6455)Also, only render modulepreloads on SSR. Do not render modulepreloads when hydrated.
-
Add
HeadersArgstype to be consistent with loaders/actions/meta and allows for using afunctiondeclaration in addition to an arrow function expression (#6247)import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno export function headers({ loaderHeaders }: HeadersArgs) { return { "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", }; } -
better error message when
remix-serveis not found (#6477) -
restore color for app server output (#6485)
-
Fix route ranking bug with pathless layout route next to a sibling index route (#4421)
- Under the hood this is done by removing the trailing slash from all generated
pathvalues since the number of slash-delimited segments counts towards route ranking so the trailing slash incorrectly increases the score for routes
- Under the hood this is done by removing the trailing slash from all generated
-
Support sibling pathless layout routes by removing pathless layout routes from the unique route path checks in conventional route generation since they inherently trigger duplicate paths (#4421)
-
fix dev server crashes caused by ungraceful hdr error handling (#6467)
-
Updated dependencies:
@remix-run/server-runtime@1.17.0
1.16.1
Patch Changes
- Cross-module
loaderchange detection for HDR (#6299) - Normalize path for dev server
PATHenvvar so that it works cross-platform (e.g. Windows) (#6310) - Fix CSS imports in JS files that use JSX (#6309)
- Kill app server when dev server exits (#6395)
- Wait until app server is killed before starting a new app server (#6289)
- Ensure CSS bundle changes result in a new manifest hash (#6374)
- Normalize file paths before testing if a changed file is a route entry (#6293)
- Fix race where app server responds with updated manifest version before dev server is listening for it (#6294)
- dev server now listens for updated versions before writing the server changes, guaranteeing that it is listening before the app server gets a chance to send its 'ready' message
- Only process
.css.ts/.css.jsfiles with Vanilla Extract if@vanilla-extract/cssis installed (#6345) - Stop modifying a user's
tsconfig.jsonwhen running usinggetConfig(remix dev,remix routes,remix build, etc) (#6156) - Cancel previous build when rebuild is kicked off to prevent rebuilds from hanging (#6295)
- Update minimum version of Babel dependencies to avoid errors parsing decorators (#6390)
- Support asset imports when detecting loader changes for HDR (#6396)
- Updated dependencies:
@remix-run/server-runtime@1.16.1
1.16.0
Minor Changes
-
Enable support for CSS Modules, Vanilla Extract and CSS side-effect imports (#6046)
These CSS bundling features were previously only available via
future.unstable_cssModules,future.unstable_vanillaExtractandfuture.unstable_cssSideEffectImportsoptions inremix.config.js, but they have now been stabilized.In order to use these features, check out our guide to CSS bundling in your project.
-
Stabilize built-in PostCSS support via the new
postcssoption inremix.config.js. As a result, thefuture.unstable_postcssoption has also been deprecated. (#5960)The
postcssoption isfalseby default, but when set totruewill enable processing of all CSS files using PostCSS ifpostcss.config.jsis present.If you followed the original PostCSS setup guide for Remix, you may have a folder structure that looks like this, separating your source files from its processed output:
. โโโ app โ โโโ styles (processed files) โ โโโ app.css โ โโโ routes โ โโโ index.css โโโ styles (source files) โโโ app.css โโโ routes โโโ index.cssAfter you've enabled the new
postcssoption, you can delete the processed files fromapp/stylesfolder and move your source files fromstylestoapp/styles:. โโโ app โ โโโ styles (source files) โ โโโ app.css โ โโโ routes โ โโโ index.cssYou should then remove
app/stylesfrom your.gitignorefile since it now contains source files rather than processed output.You can then update your
package.jsonscripts to remove any usage ofpostcsssince Remix handles this automatically. For example, if you had followed the original setup guide:{ "scripts": { - "dev:css": "postcss styles --base styles --dir app/styles -w", - "build:css": "postcss styles --base styles --dir app/styles --env production", - "dev": "concurrently \"npm run dev:css\" \"remix dev\"" + "dev": "remix dev" } } -
Stabilize built-in Tailwind support via the new
tailwindoption inremix.config.js. As a result, thefuture.unstable_tailwindoption has also been deprecated. (#5960)The
tailwindoption isfalseby default, but when set totruewill enable built-in support for Tailwind functions and directives in your CSS files iftailwindcssis installed.If you followed the original Tailwind setup guide for Remix and want to make use of this feature, you should first delete the generated
app/tailwind.css.Then, if you have a
styles/tailwind.cssfile, you should move it toapp/tailwind.css.rm app/tailwind.css mv styles/tailwind.css app/tailwind.cssOtherwise, if you don't already have an
app/tailwind.cssfile, you should create one with the following contents:@tailwind base; @tailwind components; @tailwind utilities;You should then remove
/app/tailwind.cssfrom your.gitignorefile since it now contains source code rather than processed output.You can then update your
package.jsonscripts to remove any usage oftailwindcsssince Remix handles this automatically. For example, if you had followed the original setup guide:{ // ... "scripts": { - "build": "run-s \"build:*\"", + "build": "remix build", - "build:css": "npm run generate:css -- --minify", - "build:remix": "remix build", - "dev": "run-p \"dev:*\"", + "dev": "remix dev", - "dev:css": "npm run generate:css -- --watch", - "dev:remix": "remix dev", - "generate:css": "npx tailwindcss -o ./app/tailwind.css", "start": "remix-serve build" } // ... } -
The Remix dev server spins up your app server as a managed subprocess. (#6133) This keeps your development environment as close to production as possible. It also means that the Remix dev server is compatible with any app server.
By default, the dev server will use the Remix App Server, but you opt to use your own app server by specifying the command to run it via the
-c/--commandflag:remix dev # uses `remix-serve <serve build path>` as the app server remix dev -c "node ./server.js" # uses your custom app server at `./server.js`The dev server will:
- force
NODE_ENV=developmentand warn you if it was previously set to something else - rebuild your app whenever your Remix app code changes
- restart your app server whenever rebuilds succeed
- handle live reload and HMR + Hot Data Revalidation
App server coordination
In order to manage your app server, the dev server needs to be told what server build is currently being used by your app server. This works by having the app server send a "I'm ready!" message with the Remix server build hash as the payload.
This is handled automatically in Remix App Server and is set up for you via calls to
broadcastDevReadyorlogDevReadyin the official Remix templates.If you are not using Remix App Server and your server doesn't call
broadcastDevReady, you'll need to call it in your app server after it is up and running. For example, in an Express server:// server.js // <other imports> import { broadcastDevReady } from "@remix-run/node"; // Path to Remix's server build directory ('build/' by default) const BUILD_DIR = path.join(process.cwd(), "build"); // <code setting up your express server> app.listen(3000, () => { const build = require(BUILD_DIR); console.log("Ready: http://localhost:" + port); // in development, call `broadcastDevReady` _after_ your server is up and running if (process.env.NODE_ENV === "development") { broadcastDevReady(build); } });Options
Options priority order is: 1. flags, 2. config, 3. defaults.
Option flag config default Command -c/--commandcommandremix-serve <server build path>HTTP(S) scheme --http-schemehttpSchemehttpHTTP(S) host --http-hosthttpHostlocalhostHTTP(S) port --http-porthttpPortDynamically chosen open port Websocket port --websocket-portwebsocketPortDynamically chosen open port No restart --no-restartrestart: falserestart: true๐จ The
--http-*flags are only used for internal dev server <-> app server communication. Your app will run on your app server's normal URL.To set
unstable_devconfiguration, replaceunstable_dev: truewithunstable_dev: { <options> }. For example, to set the HTTP(S) port statically:// remix.config.js module.exports = { future: { unstable_dev: { httpPort: 8001, }, }, };SSL and custom hosts
You should only need to use the
--http-*flags and--websocket-portflag if you need fine-grain control of what scheme/host/port for the dev server. If you are setting up SSL or Docker networking, these are the flags you'll want to use.๐จ Remix will not set up SSL and custom host for you. The
--http-schemeand--http-hostflag are for you to tell Remix how you've set things up. It is your task to set up SSL certificates and host files if you want those features.--no-restartandrequirecache purgingIf you want to manage server changes yourself, you can use the
--no-restartflag to tell the dev server to refrain from restarting your app server when builds succeed:remix dev -c "node ./server.js" --no-restartFor example, you could purge the
requirecache of your app server to keep it running while picking up server changes. If you do so, you should watch the server build path (build/by default) for changes and only purge therequirecache when changes are detected.๐จ If you use
--no-restart, it is your responsibility to callbroadcastDevReadywhen your app server has picked up server changes. For example, withchokidar:// server.dev.js const BUILD_PATH = path.resolve(__dirname, "build"); const watcher = chokidar.watch(BUILD_PATH); watcher.on("change", () => { // 1. purge require cache purgeRequireCache(); // 2. load updated server build const build = require(BUILD_PATH); // 3. tell dev server that this app server is now ready broadcastDevReady(build); }); - force
Patch Changes
- Fix absolute paths in CSS
url()rules when using CSS Modules, Vanilla Extract and CSS side-effect imports (#5788) - look for @remix-run/serve in
devDependencieswhen running remix dev (#6228) - add warning for v2 "cjs"->"esm"
serverModuleFormatdefault change (#6154) - write mjs server output files (#6225)
- fix(react,dev): dev chunking and refresh race condition (#6201)
- Use correct require context in
bareImportsplugin. (#6181) - use minimatch for regex instead of glob-to-regexp (#6017)
- add
logDevReadyas replacement for platforms that can't initialize async I/O outside of the request response lifecycle. (#6204) - Use the "automatic" JSX runtime when processing MDX files. (#6098)
- forcibly kill app server during dev (#6197)
- show first compilation error instead of cancelation errors (#6202)
- Resolve imports from route modules across the graph back to the virtual module created by the v2 routes plugin. This fixes issues where we would duplicate portions of route modules that were imported. (#6098)
- Updated dependencies:
@remix-run/server-runtime@1.16.0
1.15.0
Minor Changes
-
Added deprecation warning for
v2_normalizeFormMethod(#5863) -
Added a new
future.v2_normalizeFormMethodflag to normalize the exposeduseNavigation().formMethodas an uppercase HTTP method to align with the previoususeTransitionbehavior as well as thefetch()behavior of normalizing to uppercase HTTP methods. (#5815)- When
future.v2_normalizeFormMethod === false,useNavigation().formMethodis lowercaseuseFetcher().formMethodis uppercase
- When
future.v2_normalizeFormMethod === true:useNavigation().formMethodis uppercaseuseFetcher().formMethodis uppercase
- When
-
Added deprecation warning for
browserBuildDirectoryinremix.config(#5702) -
Added deprecation warning for
CatchBoundaryin favor offuture.v2_errorBoundary(#5718) -
Added experimental support for Vanilla Extract caching, which can be enabled by setting
future.unstable_vanillaExtract: { cache: true }inremix.config. This is considered experimental due to the use of a brand new Vanilla Extract compiler under the hood. In order to use this feature, you must be using at leastv1.10.0of@vanilla-extract/css. (#5735) -
Added deprecation warning for
serverBuildDirectoryinremix.config(#5704)
Patch Changes
- Fixed issue to ensure changes to CSS inserted via
@remix-run/css-bundleare picked up during HMR (#5823) - We now use
path.resolvewhen re-exportingentry.client(#5707) - Added support for
.mjsand.cjsextensions when detecting CSS side-effect imports (#5564) - Fixed resolution issues for pnpm users installing
react-refresh(#5637) - Added deprecation warning for
future.v2_meta(#5878) - Added optional entry file support for React 17 (#5681)
- Updated dependencies:
@remix-run/server-runtime@1.15.0
1.14.3
Patch Changes
- dev server is resilient to build failures (#5795)
- Updated dependencies:
@remix-run/server-runtime@1.14.3
1.14.2
Patch Changes
- remove premature deprecation warnings (#5790)
- Updated dependencies:
@remix-run/server-runtime@1.14.2
1.14.1
Patch Changes
- Add types for importing
*.icofiles (#5430) - Allow
moduleResolution: "bundler"in tsconfig.json (#5576) - Fix issue with x-route imports creating multiple entries in the module graph (#5721)
- Add
serverBuildTargetdeprecation warning (#5624) - Updated dependencies:
@remix-run/server-runtime@1.14.1
1.14.0
Minor Changes
- Hot Module Replacement and Hot Data Revalidation (#5259)
- Requires
unstable_devfuture flag to be enabled - HMR provided through React Refresh
- Features:
- HMR for component and style changes
- HDR when loaders for current route change
- Known limitations for MVP:
- Only implemented for React via React Refresh
- No
import.meta.hotAPI exposed yet - Revalidates all loaders on route when loader changes are detected
- Loader changes do not account for imported dependencies changing
- Requires
- Make
entry.clientandentry.serverfiles optional (#4600)- we'll use a bundled version of each unless you provide your own
Patch Changes
-
Fixes flat route inconsistencies where
route.{ext}wasn't always being treated likeindex.{ext}when used in a folder (#5459)-
Route conflict no longer throw errors and instead display a helpful warning that we're using the first one we found.
โ ๏ธ Route Path Collision: "/dashboard" The following routes all define the same URL, only the first one will be used ๐ข๏ธ๏ธ routes/dashboard/route.tsx โญ๏ธ๏ธ routes/dashboard.tsxโ ๏ธ Route Path Collision: "/" The following routes all define the same URL, only the first one will be used ๐ข๏ธ๏ธ routes/_landing._index.tsx โญ๏ธ๏ธ routes/_dashboard._index.tsx โญ๏ธ routes/_index.tsx
-
-
Log errors thrown during initial build in development. (#5441)
-
Sync
FutureConfiginterface between packages (#5398) -
Add file loader for importing
.csvfiles (#3920) -
Updated dependencies:
@remix-run/server-runtime@1.14.0
1.13.0
Minor Changes
- We are deprecating
serverBuildTargetinremix.config. See the release notes for v1.13.0 for more information. (#5354) - Add built-in support for PostCSS via the
future.unstable_postcssfeature flag (#5229) - Add built-in support for Tailwind via the
future.unstable_tailwindfeature flag (#5229)
Patch Changes
- Mark Vanilla Extract files as side effects to ensure that files only containing global styles aren't tree-shaken (#5246)
- Support decorators in files using CSS side-effect imports (#5305)
- We made several Flat route fixes and enhancements. See the release notes for v1.13.0 for more information. (#5228)
- Updated dependencies:
@remix-run/server-runtime@1.13.0
1.12.0
Minor Changes
- Added a new development server available in the Remix config under the
unstable_devflag. See the release notes for a full description. (#5133)
Patch Changes
- Fixed issues with
v2_routeConventionon Windows so that new and renamed files are properly included (#5266) - Server build should not be removed in
remix watchandremix dev(#5228) - The dev server will now clean up build directories whenever a rebuild starts (#5223)
- Updated dependencies:
@remix-run/server-runtime@1.12.0
1.11.1
Patch Changes
- Fixed a bug with
v2_routeConventionthat preventedindexmodules from being recognized for route paths (195291a3d) - Updated dependencies:
@remix-run/server-runtime@1.11.1
1.11.0
Minor Changes
- Specify file loader for
.fbx,.glb,.gltf,.hdr, and.movfiles (#5030) - Added support for Vanilla Extract via the
unstable_vanillaExtractfuture flag. IMPORTANT: Features marked withunstableare โฆ unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#5040) - Add support for CSS side-effect imports via the
unstable_cssSideEffectImportsfuture flag. IMPORTANT: Features marked withunstableare โฆ unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#4919) - Add support for CSS Modules via the
unstable_cssModulesfuture flag. IMPORTANT: Features marked withunstableare โฆ unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#4852)
Patch Changes
- Add new "flat" routing conventions. This convention will be the default in v2 but is available now under the
v2_routeConventionfuture flag. (#4880) - Added support for
handlein MDX frontmatter (#4865) - Updated dependencies:
@remix-run/server-runtime@1.11.0
1.10.1
Patch Changes
- Update babel config to transpile down to node 14 (#5047)
- Updated dependencies:
@remix-run/server-runtime@1.10.1
1.10.0
Patch Changes
- Fixed several issues with TypeScript to JavaScript conversion when running
create-remix(#4891) - Resolve asset entry full path to support monorepo import of styles (#4855)
- Updated dependencies:
@remix-run/server-runtime@1.10.0
1.9.0
Minor Changes
- Allow defining multiple routes for the same route module file (#3970)
- Added support and conventions for optional route segments (#4706)
Patch Changes
- The Remix compiler now supports new Typescript 4.9 syntax (like the
satisfieskeyword) (#4754) - Optimize
parentRouteIdlookup indefineConventionalRoutes. (#4800) - Fixed a bug in
.ts->.jsconversion on Windows by using a relative unix-style path (#4718) - Updated dependencies:
@remix-run/server-runtime@1.9.0
1.8.2
Patch Changes
- Updated dependencies:
@remix-run/server-runtime@1.8.2@remix-run/serve@1.8.2
1.8.1
Patch Changes
- Added a missing type definition for the Remix config
futureoption to the@remix-run/dev/server-buildvirtual module (#4771) - Updated dependencies:
@remix-run/serve@1.8.1@remix-run/server-runtime@1.8.1
1.8.0
Minor Changes
- Added support for a new route
metaAPI to handle arrays of tags instead of an object. For details, check out the RFC. (#4610)
Patch Changes
- Importing functions and types from the
remixpackage is deprecated, and all exported modules will be removed in the next major release. For more details,see the release notes for 1.4.0 where these changes were first announced. (#4661) - Updated dependencies:
@remix-run/server-runtime@1.8.0@remix-run/serve@1.8.0
1.7.6
Patch Changes
- Updated dependencies:
@remix-run/serve@1.7.6@remix-run/server-runtime@1.7.6
Patch Changes
- Updated dependencies:
@remix-run/serve@1.7.6-pre.0@remix-run/server-runtime@1.7.6-pre.0
1.7.5
Patch Changes
- Updated dependencies:
@remix-run/serve@1.7.5@remix-run/server-runtime@1.7.5
1.7.4
Patch Changes
- Updated dependencies:
@remix-run/server-runtime@1.7.4@remix-run/serve@1.7.4
1.7.3
Patch Changes
- Update
create-remixto use the new examples repository when using--template example/<name>(#4208) - Add support for setting
moduleResolutiontonode,node16ornodenextintsconfig.json. (#4034) - Add resources imported only by resource routes to
assetsBuildDirectory(#3841) - Ensure that any assets referenced in CSS files are hashed and copied to the
assetsBuildDirectory. (#4130) - Updated dependencies:
@remix-run/serve@1.7.3@remix-run/server-runtime@1.7.3
1.7.2
Patch Changes
- Updated dependencies:
@remix-run/server-runtime@1.7.2@remix-run/serve@1.7.2
1.7.1
Patch Changes
- Updated dependencies:
@remix-run/server-runtime@1.7.1@remix-run/serve@1.7.1
1.7.0
Minor Changes
- Added support for importing
.gqland.graphqlfiles as plain text (#3923) - Added support for importing
.zipand.aviffiles as resource URLs (#3985)
Patch Changes
- Removed our compiler's React shim in favor of esbuild's new automatic JSX transform (#3860)
- Updated dependencies:
@remix-run/server-runtime@1.7.0@remix-run/serve@1.7.0
1.6.8
Patch Changes
- Added support for
.mjsand.cjsfile extensions forremix.config(#3675) - Added support for importing
.sqlfiles as text content (#3190) - Updated the compiler to make MDX builds deterministic (and a little faster!) (#3966)
- Updated dependencies:
@remix-run/server-runtime@1.6.8@remix-run/serve@1.6.8
1.6.7
Patch Changes
- Remove logical nullish assignment, which is incompatible with Node v14. (#3880)
- Don't show ESM warnings when consumed via dynamic import. (#3872)
- Updated dependencies:
@remix-run/serve@1.6.7@remix-run/server-runtime@1.6.7
1.6.6
Patch Changes
- Write server build output files so that only assets imported from resource routes are written to disk (#3817)
- Add support for exporting links in
.mdxfiles (#3801) - Ensure that build hashing is deterministic (#2027)
- Fix types for
@remix-run/dev/server-buildvirtual module (#3743) - Updated dependencies:
@remix-run/serve@1.6.6@remix-run/server-runtime@1.6.6