Skip to content

Releases: remix-run/remix

v1.2.1

16 Feb 22:07
Compare
Choose a tag to compare

Version 1.2.0 mistakenly included an incomplete feature in the create-remix CLI. This patch removes that.

v1.2.0

16 Feb 20:24
Compare
Choose a tag to compare

We've been plugging away at a few important features and improvements for this release, so buckle up and get ready for a ride 🚀 (click here for a quick breakdown of all changes)

New Feature: serverBuildTarget

In v1.2 we are doubling down on the power—and improving the simplicity—of integrating your server with your app. This release introduces a new config option serverBuildTarget that removes some of the overhead of configuring Remix to interface with your deploy target, and it's an important first step towards being able to move your application with greater ease as requirements change.

When you specify a build target, Remix will take care of configuring other details like the build directory and module format. serverBuildTarget supports a number of deployment platforms and runtimes:

  • "node-cjs"
  • "arc"
  • "netlify"
  • "vercel"
  • "cloudflare-pages"
  • "cloudflare-workers"
  • "deno" 👀

If this option is not set, your app works exactly as it did before. If you bootstrapped your app with the Remix App Server or are using your own Node server, we suggest setting this option to "node-cjs".

New Feature: Single-file server builds

In addition to simplifying server configuration, we've also introduced a way for users to compile their server along with their app using the new server config option. This setting is optional, points to the path of your custom server, and allows Remix to compile your server and app to a single file.

What does this mean for you? If you are deploying to Cloudflare Workers, this allows you to remove the secondary build step, as our compiler takes care of everything for you. It also means you can write your custom server in TypeScript 🥳

Custom server code example
// remix.config.js
module.exports = {
  server: "./server.ts"
};

// server.ts
import express from "express";
// Import the output of your server build from a Remix virtual module
import * as serverBuild from "@remix-run/dev/server-build";

let app = express();
app.all(
  "*",
  createRequestHandler({
    build: serverBuild
  })
);

If this option is not set, your app works as it did before, and you will continue to import the output from your server build directory instead of our new virtual module. Also note that with this new capability we have deprecated serverBuildDirectory and suggest that you use serverBuildPath instead.

New Feature: Browser shims for Node built-ins

Remix can now add polyfills for built-in node_modules in the browser. This is really useful if you need to access utilities like path or read from process in your client code. It should also make migrating your Webpack projects to Remix a breeze.

These shims are only used if you use Node built-ins in client code. Remix already tree-shakes server code out of your client bundles, so if you don't use these modules outside of your loaders and actions this won't change anything for you. But it can prevent nasty failures at runtime if you do!

New Feature: Using ESM-only packages on node

We added a serverDependenciesToBundle config option that tells Remix which dependencies to include in your server bundle when using the node-cjs build target. This allows you to use packages that publish only ESM in your CommonJS output.

Using ESM-only packages on node
// remix.config.js
module.exports = {
  serverDependenciesToBundle: [
    "remark"
  ]
};

🧪 Experimental Feature: Deno adapter

If you've read this far, you may have noticed an interesting little detail in our new serverBuildTarget options. We now provide an adapter package to deploy to Deno, and we've added this option to the create-remix CLI 🤯

We are very excited about Deno and bullish on its future, so providing first-class support is a huge step towards supporting the Deno ecosystem. It's still the early days in this space and we'd love your help battle testing our adapter to make Remix and Deno a rock-solid force to be reckoned with. 💪


TLDR: What Changed?

✨ Features

  • New serverBuildTarget config option to specify your deployment target and simplify integration with your Remix adapter
  • New server config option that allows us to compile your server and app into a single file. This allows for simpler deployment, as well as eliminating the secondary build step for users deploying to Cloudflare Workers or writing their server code in TypeScript.
  • Add DynamoDB tables session storage for @remix-run/architect (#1538)
  • 🧪 EXPERIMENTAL New Deno adapter! You can now install @remix-run/deno or bootstrap your app by selecting deno in the create-remix CLI.

💅 Enhancements

  • Dev server should watch remix.config.js server file (#1605)
  • remix dev should now find an available port if the default port isn't available (#871 + #1352)
  • process.env.NODE_ENV check is no longer needed for <LiveReload /> (#1352)
  • Added support for binary data responses in @remix-run/architect and @remix-run/netlify (#1780)
  • Implemented a minimum version check for Node to prevent confusing crash logs (#1586)
  • Lots of error message improvements! 🙏

🐛 Bug fixes

  • Allow for streams to be returned as the response body in @remix-run/vercel (#1470)
  • Fix forwarding of request cookie headers in @remix-run/architect (#1709)
  • Fix a bug preventing remix dev and remix serve from running offline (#1743)
  • Fix support for submit buttons outside of their form element in <Form> (#1781)
  • Fix both Link and NavLink to ensure prefetch works with explicit event handlers by (#1783)
  • Add Netlify-specific context to Remix server actions when used with @remix-run/netlify (#1835)
  • Fix a bug where numerical URL targets caused sites to hang and crash (#936)
  • Fix the DynamoDB key for arcTableSessionStorage and deleteData in @remix-run/architect (#1863)
  • Fix a bug where FormData methods would return null for empty strings (#1869)
  • Fixed a bug where a button's data was missing if the user clicked on a nested element inside the button (#1240)
  • Reset useFetcher().submission state back to "idle" after a redirect (#1875)
  • Fixed native _redirects support for Cloudflare Pages by (#1237)
  • Added missing statusText to responses in @remix-run/express and @remix-run/vercel (#1234)

☠️ Deprecated

  • remix.config.js
    • serverBuildDirectory is deprecated; use serverBuildPath instead
    • serverModuleFormat and serverPlatform are both deprecated; use serverBuildTarget instead

New Contributors

Read more

v1.2.0-pre.1

15 Feb 22:43
Compare
Choose a tag to compare
v1.2.0-pre.1 Pre-release
Pre-release

⚠️ This is an experimental pre-release. Release notes are published on the stable release.

v1.2.0-pre.0

15 Feb 02:38
Compare
Choose a tag to compare
v1.2.0-pre.0 Pre-release
Pre-release

⚠️ This is an experimental pre-release. Release notes are published on the stable release.

v1.1.3

20 Jan 15:16
Compare
Choose a tag to compare

Fixed CLI

v1.1.2

20 Jan 14:21
Compare
Choose a tag to compare

Bug Fixes 🐛

  • Fixed a bug with a response header in @remix-run/cloudflare-pages throwing an error for Windows users (#1184)
  • Ensured the correct minimum Node version for @remix-run/architect (#1341) and @remix-run/cloudflare-pages (#1391)
  • Removed aws-sdk dependency from @remix-run/architect as it should be globally installed (#1342)
  • Fixed an edge case with some sibling __layout routes causing conflicts (#1347)
  • In some cases, a prefetch link tag and the actual data fetched by the link were not the same because the fetching code sorted the request params. We are no longer sorting those params so the data should always match. (#1396)
  • Fixed the error message when loader returns undefined (#1530)

New Contributors

Full Changelog: v1.1.0...v1.1.2

v1.1.1

18 Dec 03:30
Compare
Choose a tag to compare

This release fixes a bug in @remix-run/serve that broke the production build due to a missing module (#1128, #1129)

v1.1.0

17 Dec 23:44
Compare
Choose a tag to compare

✨ Features

  • Added direct support for deploying to Cloudflare Pages via @remix-run/cloudflare-pages (#1060)
  • Enabled link prefetching of route preloads. When route's export preload links, link prefetching will include those assets in addition to the normal resources (data, js modules, and css) (#569)
  • Added support for multipart form data, which means added support for file uploads 💾 (#383)
  • Added the <Outlet context> prop and useOutletContext hooks from React Router (#939)
  • Added support for ESM output in server builds (#976)
  • Added the ignoredRouteFiles option to remix.config.js. This option accepts an array of glob patterns that Remix will ignore if matching files exist in your routes directory. (#989)
  • Added the serverPlatform option to remix.config.js. The default option is "node" but it can be set to "neutral" for non-Node deployment targets like Cloudflare Workers. (#1084)

🐛 Bug fixes

  • Fixed formatting that caused problems deploying to Digital Ocean's app platform (#849)
  • Fixed a bug the prevented multiple checkbox values from being submitted (#814)
  • Fixed a bug in the Cloudflare Workers adapter setting the wrong KV expiration values (#414)
  • Stopped routes from loading before redirects if they will never render (#858)
  • Fixed a bug where the dev process would not properly exist when using Prisma (#905)
  • Fixed a bug that caused out-of-sync versioning between react and react-dom (#926)
  • Previously fetcher.data was erroneously removed when a fetcher was reloaded or resubmitted. This required apps to duplicate the state into their own app state to build a UI that didn't flicker data. (#1109)

💅 Enhancements

  • Several type improvements (#439)
  • Remove React JSX Transform Warnings in VSCode (#720)
  • We can now surface errors from fetch submissions into boundary components for better error handling (#860)
  • We eliminated most of the starter files when running npx create-remix. You now have a blank slate to begin designing the app of your dreams 💭

New Contributors

Full Changelog: v1.0.6...v1.1.0

v0.0.0-experimental-db4e08b8

10 Dec 21:07
Compare
Choose a tag to compare
Pre-release

🐛 Bug fixes

  • Fixes circular dependency issues (#787)

✨ Features

  • Introduces @remix-run/eslint-config package (#357)
  • Allows ESM output of server builds (#976)

Full Changelog: v1.0.6...v0.0.0-experimental-db4e08b8

v0.0.0-experimental-b697c4f3

09 Dec 02:44
Compare
Choose a tag to compare
Pre-release

What's Changed

Bug fixes 🐛

  • Fix formatting issues causing build to fail in some environments (#849)
  • Fixed a bug in <Form> that was causing some values to override the search params instead of appending them (#814)
  • @remix-run/cloudflare-workers: Use seconds in KV session storage expiration (#910)

Features ✨

  • Add support for file uploads in <Form> (#383)
  • Enable routes to tell links to prefetch any kind of asset without the <link> component needing to know (#569)
  • Add <Outlet context> prop. This prop adds the ability to pass UI state down to nested routes. (#939)
  • Use assetsBuildDirectory instead of the deprecated browserBuildDirectory config option (#587)

Enhancements 💅

  • The json function type now accepts an optional generic argument for the return type (#439)
  • Strip excess error messages in the client on production
  • fix: jokes tutorial actions should return 400 status for errors by @Graham42 in #895
  • fix(fly): use remote-only deploys by @kentcdodds in #930

New Contributors

Full Changelog: v1.0.6...v0.0.0-experimental-b697c4f3