Releases: remix-run/remix
v1.2.1
v1.2.0
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 selectingdeno
in thecreate-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
andremix serve
from running offline (#1743) - Fix support for submit buttons outside of their form element in
<Form>
(#1781) - Fix both
Link
andNavLink
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
anddeleteData
in@remix-run/architect
(#1863) - Fix a bug where
FormData
methods would returnnull
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; useserverBuildPath
insteadserverModuleFormat
andserverPlatform
are both deprecated; useserverBuildTarget
instead
New Contributors
- @mbarto made their first contribution in #1470
- @jamiebuilds made their first contribution in #1649
- @confix made their first contribution in #1709
- @Runner-dev made their first contribution in #1718
- @nwalters512 made their first contribution in #1716
- @sdavids made their first contribution in #1712
- @gabimor made their first contribution in #1699
- @lionotm made their first contribution in #1692
- @omamazainab made their first contribution in #1689
- @hadizz made their first contribution in #1684
- @jdeniau made their first contribution in #1675
- @toyozaki made their first contribution in #1665
- @Dueen made their first contribution in #1727
- @himorishige made their first contribution in #1674
- @AaronPowell96 made their first contribution in #1639
- @gunners6518 made their first contribution in #1647
- @RomanSavarin made their first contribution in #1646
- @anmolm96 made their first contribution in #1630
- @sndrem made their first contribution in #1612
- @joms made their first contribution in #1602
- @kanermichael made their first contribution in #1600
- @LucasDibz made their first contribution in #1599
- @damiensedgwick made their first contribution in #1584
- @mkrtchian made their first contribution in #1735
- @monitaure made their first contribution in #1746
- @manosim made their first contribution in #1147
- @lpsinger made their first contribution in #1538
- @jenseng made their first contribution in #1783
- @sandulat made their first contribution in #1473
- @ninjaPixel made their first contribution in #1833
- @alex-ketch made their first contribution in #1771
- @jgarrow made their first contribution in #1805
- @abotsi made their first contribution in #1505
- @bsides made their first contribution in #1476
- @maferland made their first contributi...
v1.2.0-pre.1
v1.2.0-pre.0
v1.1.3
Fixed CLI
v1.1.2
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
returnsundefined
(#1530)
New Contributors
- @SidKH made their first contribution in #982
- @dokeet made their first contribution in #997
- @ptitFicus made their first contribution in #1014
- @crismali made their first contribution in #994
- @kalch made their first contribution in #1017
- @nielsdB97 made their first contribution in #531
- @KenanYusuf made their first contribution in #585
- @emzoumpo made their first contribution in #558
- @hardingmatt made their first contribution in #612
- @bmontalvo made their first contribution in #650
- @phishy made their first contribution in #682
- @joaosamouco made their first contribution in #719
- @imzshh made their first contribution in #918
- @ThomasRettig made their first contribution in #968
- @kevinrambaud made their first contribution in #1009
- @dhargitai made their first contribution in #957
- @codymjarrett made their first contribution in #621
- @tascord made their first contribution in #964
- @real34 made their first contribution in #1033
- @ClarkMitchell made their first contribution in #1030
- @levippaul made their first contribution in #960
- @ashleyryan made their first contribution in #958
- @christianhg made their first contribution in #605
- @pyr0gan made their first contribution in #1066
- @unhackit made their first contribution in #1065
- @jeremyjfleming made their first contribution in #1044
- @CanRau made their first contribution in #1007
- @Sinhalite made their first contribution in #1002
- @arganaphangquestian made their first contribution in #980
- @mochi-sann made their first contribution in #979
- @jakewtaylor made their first contribution in #952
- @hkan made their first contribution in #920
- @chenc041 made their first contribution in #897
- @Holben888 made their first contribution in #893
- @tvanantwerp made their first contribution in #1088
- @MohammadHosseinBagheri made their first contribution in #888
- @efkann made their first contribution in #1184
- @yomeshgupta made their first contribution in #1263
- @DavidHollins6 made their first contribution in #1166
- @Girish21 made their first contribution in #1121
- @m5r made their first contribution in #1363
- @johnson444 made their first contribution in #1366
- @Matthew-Mallimo made their first contribution in #1372
- @Anishpras made their first contribution in #1378
- @airjp73 made their first contribution in #1375
- @IshanKBG made their first contribution in #1309
- @hollandThomas made their first contribution in #1388
- @kumard3 made their first contribution in #1386
- @AriGunawan made their first contribution in #1387
- @juwiragiye made their first contribution in #1373
- @jmasson made their first contribution in #1410
- @gavriguy made their first contribution in #1407
- @archwebio made their first contribution in #1399
- @dima-takoy made their first contribution in #1327
- @mattmazzola made their first contribution in #1447
- @jkup made their first contribution in #1391
- @leon made their first contribution in #1442
- @rphlmr made their first contribution in #1439
- @craigglennie made their first contribution in #1161
- @yauri-io made their first contribution in #1338
- @mtt87 made their first contribution in #1272
- @hzhu made their first contribution in #1192
- @arvigeus made their first contribution in #1174
- @karimsan made their first contribution in #1488
- @danielweinmann made their first contribution in #1482
- @dhmacs made their first contribution in #1523
- @orballo made their first contribution in #1530
Full Changelog: v1.1.0...v1.1.2
v1.1.1
v1.1.0
✨ 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 anduseOutletContext
hooks from React Router (#939) - Added support for ESM output in server builds (#976)
- Added the
ignoredRouteFiles
option toremix.config.js
. This option accepts an array of glob patterns that Remix will ignore if matching files exist in yourroutes
directory. (#989) - Added the
serverPlatform
option toremix.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
andreact-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
- @Alarid made their first contribution in #604
- @AhmedEldessouki made their first contribution in #575
- @lswest made their first contribution in #530
- @fishel-feng made their first contribution in #775
- @alexUXUI made their first contribution in #754
- @mattstobbs made their first contribution in #770
- @eps1lon made their first contribution in #427
- @zachdtaylor made their first contribution in #734
- @stephanerangaya made their first contribution in #767
- @michaelfriedman made their first contribution in #766
- @evanwinter made their first contribution in #445
- @M0nica made their first contribution in #446
- @manzoorwanijk made their first contribution in #713
- @nareshbhatia made their first contribution in #818
- @ashocean made their first contribution in #825
- @Graham42 made their first contribution in #794
- @VictorPeralta made their first contribution in #560
- @gon250 made their first contribution in #549
- @zainfathoni made their first contribution in #757
- @weavdale made their first contribution in #849
- @sergiodxa made their first contribution in #439
- @Hopsken made their first contribution in #798
- @LuisPaGarcia made their first contribution in #455
- @nobeeakon made their first contribution in #473
- @jaydiablo made their first contribution in #475
- @PrinceRajRoy made their first contribution in #476
- @Shumuu made their first contribution in #477
- @francisudeji made their first contribution in #855
- @davecalnan made their first contribution in #870
- @skube made their first contribution in #521
- @sitek94 made their first contribution in #568
- @luistorres made their first contribution in #583
- @dunglas made their first contribution in #508
- @johannesbraeunig made their first contribution in #502
- @sean-roberts made their first contribution in #610
- @kubaprzetakiewicz made their first contribution in #507
- @kimdontdoit made their first contribution in #619
- @Gideon28 made their first contribution in #630
- @tjefferson08 made their first contribution in #563
- @UsamaHameed made their first contribution in #486
- @Matthew-Burfield made their first contribution in #666
- @plastic041 made their first contribution in #670
- @HenryVogt made their first contribution in #641
- @lachlanjc made their first contribution in #684
- @bruno-oliveira made their first contribution in #710
- @veritem made their first contribution in #755
- @AHBruns made their first contribution in #720
- @RossJHagan made their first contribution in #789
- @niconiahi made their first contribution in #791
- @fergusmeiklejohn made their first contribution in #802
- @dwt47 made their first contribution in #512
- @RossMcMillan92 made their first contribution in #853
- @twhitbeck made their first contribution in #540
- @derekr made their first contribution in #892
- @christophgockel made their first contribution in #887
- @reggie3 made their first contribution in #908
- @edgesoft made their first contribution in #877
- @matchai made their first contribution in #884
- @GregBrimble made their first contribution in #910
- @mskoroglu made their first contribution in #482
- @gonzoscript made their first contribution in #955
- @developit made their first contribution in #422
- @donavon made their first contribution in #1027
- @yesmeck made their first contribution in #926
Full Changelog: v1.0.6...v1.1.0
v0.0.0-experimental-db4e08b8
🐛 Bug fixes
- Fixes circular dependency issues (#787)
✨ Features
Full Changelog: v1.0.6...v0.0.0-experimental-db4e08b8
v0.0.0-experimental-b697c4f3
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 deprecatedbrowserBuildDirectory
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
- @Alarid made their first contribution in #604
- @AhmedEldessouki made their first contribution in #575
- @lswest made their first contribution in #530
- @medayz made their first contribution in #758
- @fishel-feng made their first contribution in #775
- @alexUXUI made their first contribution in #754
- @mattstobbs made their first contribution in #770
- @eps1lon made their first contribution in #427
- @zachdtaylor made their first contribution in #734
- @stephanerangaya made their first contribution in #767
- @michaelfriedman made their first contribution in #766
- @evanwinter made their first contribution in #445
- @M0nica made their first contribution in #446
- @manzoorwanijk made their first contribution in #713
- @nareshbhatia made their first contribution in #818
- @coryhouse made their first contribution in #828
- @silvenon made their first contribution in #838
- @ashocean made their first contribution in #825
- @Graham42 made their first contribution in #794
- @VictorPeralta made their first contribution in #560
- @gon250 made their first contribution in #549
- @zainfathoni made their first contribution in #757
- @weavdale made their first contribution in #849
- @sergiodxa made their first contribution in #439
- @Hopsken made their first contribution in #798
- @LuisPaGarcia made their first contribution in #455
- @nobeeakon made their first contribution in #473
- @jaydiablo made their first contribution in #475
- @PrinceRajRoy made their first contribution in #476
- @Shumuu made their first contribution in #477
- @francisudeji made their first contribution in #855
- @davecalnan made their first contribution in #870
- @prvnbist made their first contribution in #490
- @skube made their first contribution in #521
- @sitek94 made their first contribution in #568
- @luistorres made their first contribution in #583
- @dunglas made their first contribution in #508
- @johannesbraeunig made their first contribution in #502
- @sean-roberts made their first contribution in #610
- @kubaprzetakiewicz made their first contribution in #507
- @kimdontdoit made their first contribution in #619
- @Gideon28 made their first contribution in #630
- @tjefferson08 made their first contribution in #563
- @UsamaHameed made their first contribution in #486
- @Matthew-Burfield made their first contribution in #666
- @plastic041 made their first contribution in #670
- @HenryVogt made their first contribution in #641
- @lachlanjc made their first contribution in #684
- @bruno-oliveira made their first contribution in #710
- @veritem made their first contribution in #755
- @AHBruns made their first contribution in #720
- @RossJHagan made their first contribution in #789
- @niconiahi made their first contribution in #791
- @fergusmeiklejohn made their first contribution in #802
- @dwt47 made their first contribution in #512
- @RossMcMillan92 made their first contribution in #853
- @twhitbeck made their first contribution in #540
- @derekr made their first contribution in #892
- @christophgockel made their first contribution in #887
- @reggie3 made their first contribution in #908
- @edgesoft made their first contribution in #877
- @matchai made their first contribution in #884
- @GregBrimble made their first contribution in #910
- @mskoroglu made their first contribution in #482
- @gonzoscript made their first contribution in #955
Full Changelog: v1.0.6...v0.0.0-experimental-b697c4f3