This repository has been archived by the owner on Nov 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Update dependency @vercel/remix to v2 #359
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/vercel-remix-2.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
September 18, 2023 19:30
b572b56
to
ac04206
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
September 19, 2023 21:20
ac04206
to
789ce0f
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
September 20, 2023 23:13
789ce0f
to
3031974
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
September 26, 2023 18:53
3031974
to
f0f673c
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
September 28, 2023 16:00
f0f673c
to
60e0818
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 1, 2023 10:21
60e0818
to
67e7c91
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 5, 2023 01:22
67e7c91
to
f67f541
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 9, 2023 16:44
f67f541
to
353f611
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 9, 2023 22:43
353f611
to
66543a7
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 11, 2023 00:24
66543a7
to
e66adbb
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 18, 2023 14:49
e66adbb
to
3448441
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 19, 2023 21:29
3448441
to
dccf685
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 20, 2023 17:01
dccf685
to
add7499
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 25, 2023 21:14
add7499
to
d77796f
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
October 26, 2023 07:46
d77796f
to
98006fd
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
November 2, 2023 20:15
98006fd
to
04ffb1c
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
January 20, 2024 07:53
04ffb1c
to
b76e414
Compare
renovate
bot
force-pushed
the
renovate/vercel-remix-2.x
branch
from
August 20, 2024 17:29
b76e414
to
e72bc92
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.15.0
->^2.0.0
Release Notes
vercel/remix (@vercel/remix)
v2.13.1
Date: 2024-10-11
Patch Changes
@remix-run/dev
- Revertfuture.v3_optimizeDeps
back tofuture.unstable_optimizeDeps
as it was not intended to stabilize in Remix v2 (#10099)Full Changelog:
v2.13.0...v2.13.1
v2.12.0
Date: 2024-09-09
What's Changed
Future Flag for Automatic Dependency Optimization (unstable)
You can now opt-in to automatic dependency optimization during development by using the
future.unstable_optimizeDeps
future flag. For details, check out the docs at Guides > Dependency optimization. For users who were previously working around this limitation, you no longer need to explicitly add routes to Vite'soptimizeDeps.entries
nor do you need to disable theremix-dot-server
plugin.Improved Single Fetch Type Safety (unstable)
"@​remix-run/react/future/single-fetch.d.ts"
override fromtsconfig.json
>compilerOptions
>types
defineLoader
,defineAction
,defineClientLoader
,defineClientAction
helpers from your route modulesUIMatch_SingleFetch
type helper with the originalUIMatch
MetaArgs_SingleFetch
type helper with the originalMetaArgs
Then you are ready for the new type safety setup:
For more information, see Guides > Single Fetch in our docs.
Updates to Single Fetch Revalidation Behavior (unstable)
With Single Fetch, re-used routes will now revalidate by default on
GET
navigations. This is aimed at improving caching of Single Fetch calls in the simple case while still allowing users to opt-into the previous behavior for more advanced use cases.With this new behavior, requests do not need special query params for granular route revalidations out of the box - i.e.,
GET /a/b/c.data
There are two conditions that will trigger granular revalidation and will exclude certain routes from the single fetch call:
shouldRevalidate
clientLoader
serverLoader()
from yourclientLoader
, that will make a separate HTTP call for just that route loader - i.e.,GET /a/b/c.data?_routes=routes/a
for aclientLoader
inroutes/a.tsx
When one or more routes are excluded from the Single Fetch call, the remaining routes that have loaders are included as query params. For example, when navigating to
/a/b/c
, if A was excluded, and theroot
route androutes/b
had aloader
butroutes/c
did not, the Single Fetch request would beGET /a/b/c.data?_routes=root,routes/b
.For more information, see Guides > Single Fetch in our docs.
Minor Changes
@remix-run/dev
- Newfuture.unstable_optimizeDeps
flag for automatic dependency optimization (#9921)Patch Changes
@remix-run/dev
- Handle circular dependencies in modulepreload manifest generation (#9917)@remix-run/dev
- Fixdest already exists
build errors by only moving SSR assets to the client build directory when they're not already present on disk (#9901)@remix-run/react
- Clarify wording in defaultHydrateFallback
console warning (#9899)@remix-run/react
- Remove hydration URL check that was originally added for React 17 hydration issues and we no longer support React 17 (#9890)v1.18.0
via #64091.18.0
turned out to be subject to false positives of it's own which could also put the user in looping scenarios@remix-run/react
- Lazy Route Discovery: Sort/__manifest
query parameters for better caching (#9888)@remix-run/react
- Single Fetch: Improved type safety (#9893)@remix-run/react
- Single Fetch: Fix revalidation behavior bugs (#9938)@remix-run/server-runtime
- Do not render or try to include a body for 304 responses on document requests (#9955)@remix-run/server-runtime
- Single Fetch: Do not try to encode aturbo-stream
body into 304 responses (#9941)@remix-run/server-runtime
- Single Fetch: Change content type on.data
requests totext/x-script
to allow Cloudflare compression (#9889)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
@remix-run/dev
@remix-run/react
@remix-run/server-runtime
Full Changelog:
v2.11.2...v2.12.0
v2.11.2
Date: 2024-08-15
Patch Changes
@remix-run/react
- Fog of War: Simplify implementation now that React Router handles slug/splat edge cases and tracks previously discovered routes (see https://github.com/remix-run/react-router/pull/11883) (#9860)/__manifest
endpoint since we no longer need thenotFoundPaths
field@remix-run/react
- Fog of War: Update to use renamedunstable_patchRoutesOnNavigation
function in RR (see https://github.com/remix-run/react-router/pull/11888) (#9860)@remix-run/server-runtime
- Single Fetch: Fix redirects when abasename
is present (#9848)@remix-run/server-runtime
- Single Fetch: Updateturbo-stream
tov2.3.0
(#9856)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
@remix-run/react
@remix-run/server-runtime
Full Changelog:
v2.11.1...v2.11.2
v2.11.1
Date: 2024-08-05
Patch Changes
a7cffe57
)Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.11.0...v2.11.1
v2.11.0
Date: 2024-08-01
What's Changed
Renamed
unstable_fogOfWar
future flag tounstable_lazyRouteDiscovery
(unstable)We found that the
future.unstable_fogOfWar
flag name could be a bit confusing without the proper context (notably, the blog post), so we've renamed the flag tofuture.unstable_lazyRouteDiscovery
for clarity. If you had opted into this feature already, please update the name of the flag in yourvite.config.ts
file (orremix.config.js
).Removed
response
stub in Single Fetch (unstable)The original Single Fetch approach was based on an assumption that an eventual
middleware
implementation would require something like theResponseStub
API so users could mutatestatus
/headers
inmiddleware
before/after handlers as well as during handlers. As part of Single Fetch, we wanted to align how response headers would be merged between document and data requests. Thinkingresponse
was the future API, we aligned document requests to use theresponse
stub that data requests were using, and we stopped using theheaders()
function.However, the realization/alignment between Michael and Ryan on the recent roadmap planning made us realize that the original assumption was incorrect.
middleware
won't need aresponse
stub - as users can just mutate theResponse
they get fromawait next()
directly.Removing that assumption, and still wanting to align how headers get merged between document and data requests, it makes more sense to stick with the current
headers()
API and align Single Fetch data requests to use that existing API. This was we don't need to introduce any new header-related APIs which will make the adoption of Single Fetch much easier.With this change:
headers()
function will let you control header merging for both document and data requestsjson()
/defer()
without setting a customstatus
orheaders
, you can just remove those utility functions and return the raw datareturn json({ data: "whatever" });
return { data: "whatever" };
status
orheaders
viajson
/defer
:unstable_data
utility that will let you send backstatus
/headers
alongside your raw data without having to encode it into aResponse
json
anddefer
in the next major version, but both should still work in Single Fetch in v2 to allow for incremental adoption of the new behaviorresponse
stub, you'll need to move those changes back to leveraging theheaders()
API.Minor Changes
@remix-run/dev
- Fog of War: Renamefuture.unstable_fogOfWar
tofuture.unstable_lazyRouteDiscovery
for clarity (#9763)@remix-run/server-runtime
- Add a newreplace(url, init?)
alternative toredirect(url, init?)
that performs ahistory.replaceState
instead of ahistory.pushState
on client-side navigation redirects (#9764)@remix-run/server-runtime
- Single Fetch: Add a newunstable_data()
API as a replacement forjson
/defer
when customstatus
/headers
are needed (#9769)@remix-run/server-runtime
- Single Fetch: RemoveresponseStub
in favor ofheaders
(#9769)Patch Changes
@remix-run/dev
- Handle absolute Vite base URLs (#9700)@remix-run/react
- Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistencies (#9695)@remix-run/react
- Single Fetch: Ensure calls don't include any trailing slash from the pathname (i.e.,/path/.data
) (#9792)@remix-run/react
- Single Fetch: Addundefined
to theuseRouteLoaderData
type override (#9796)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.10.3...v2.11.0
v2.10.3
Date: 2024-07-16
Patch Changes
@remix-run/architect
- Manually joining headers with semi-colons to avoid differences in Remix and node/undici Headers implementation (#9664)@remix-run/react
- Log any errors encountered loading a route module prior to reloading the page (#8932)@remix-run/react
- Single Fetch (unstable): Proxyrequest.signal
throughdataStrategy
forloader
calls to fix cancellation (#9738)@remix-run/react
- Single Fetch (unstable): Adopt React Router's stabilizedfuture.v7_skipActionErrorRevalidation
under the hood (#9706)shouldRevalidate
parameter fromunstable_actionStatus
toactionStatus
unstable_actionStatus
parameterUpdated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.10.2...v2.10.3
v2.10.2
Date: 2024-07-04
Patch Changes
@remix-run/react
- Forwardref
toForm
(bdd04217
)@remix-run/server-runtime
- Fix bug withimmutable
headers on raw nativefetch
responses returned from loaders (#9693)Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.10.1...v2.10.2
v2.10.0
Date: 2024-06-25
What's Changed
Lazy Route Discovery (a.k.a. "Fog of War")
The "Fog of War" feature in Remix, now available through the
future.unstable_fogOfWar
flag, is an optimization to reduce the up front size of the Remix route manifest. In most scenarios the Remix route manifest isn't prohibitively large so as to impact initial perf metrics, but at scale we've found that some apps can generate large manifests that are expensive to download and execute on app startup.When Fog of War is enabled, Remix will only include the initially server-rendered routes in the manifest and then it will fetch manifest "patches" for outgoing links as the user navigates around. By default, to avoid waterfalls Remix fetches patches for all rendered links, so that in the ideal case they've already been patched in prior to being clicked. If a user clicks a link before this eager discovery completes, then a small waterfall will occur to first "discover" the route, and then navigate to the route.
Enabling this flag should require no application code changes. For more information, please see the documentation.
Minor Changes
Patch Changes
@remix-run/{dev|express|serve}
- Upgradeexpress
dependency to^4.19.2
(#9184)@remix-run/react
- Don't prefetch serverloader
data whenclientLoader
exists (#9580)@remix-run/react
- Avoid hydration loops whenLayout
/ErrorBoundary
renders also throw (#9566)@remix-run/react
- Fix a hydration bug when using child routes andHydrateFallback
components with abasename
(#9584)@remix-run/{server-runtime|react}
- Single Fetch: Update to[email protected]
(#9562)@remix-run/server-runtime
- Single Fetch: Properly handle thrown 4xx/5xx response stubs (#9501)@remix-run/server-runtime
- Single Fetch: Change redirects to use a 202 status to avoid automatic caching (#9564)@remix-run/server-runtime
- Single Fetch: Fix issues with returning or throwing a response stub from a resource route in single fetch (#9488)@remix-run/server-runtime
- Single Fetch: Fix error when returningnull
from a resource route (#9488)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.9.2...v2.10.0
v2.9.2
Compare Source
Date: 2024-05-10
What's Changed
Updated Type-Safety for Single Fetch
In 2.9.2 we've enhanced the type-safety when opting into the
future.unstable_singleFetch
feature. Previously, we added theresponse
stub toLoaderFunctionArgs
and used type overrides for inference onuseLoaderData
, etc., but we found that it wasn't quite enough.With this release we're introducing new functions to assist the type-inference when using single fetch -
defineLoader
/defineAction
and their client-side counterpartsdefineClientLoader
and nddefineClientAction
. These are identity functions; they don't modify your loader or action at runtime. Rather, they exist solely for type-safety by providing types for args and by ensuring valid return types.Note that
defineLoader
anddefineAction
are not technically necessary for defining loaders and actions if you aren't concerned with type-safety:This means that you can opt-in to
defineLoader
incrementally, one loader at a time.Please see the Single Fetch docs for more information.
Patch Changes
@remix-run/dev
- Vite: Fixdest already exists
error when runningremix vite:build
(#9305)@remix-run/dev
- Vite: Fix issue resolving critical CSS during development when route files are located outside of the app directory (#9194)@remix-run/dev
- Vite: Remove@remix-run/node
from Vite plugin'soptimizeDeps.include
list since it was unnecessary and resulted in Vite warnings when not depending on this package (#9287)@remix-run/dev
- Vite: Clean up redundant?client-route=1
imports in development (#9395)@remix-run/dev
- Vite: Ensure Babel config files are not referenced when applying thereact-refresh
Babel transform within the Remix Vite plugin (#9241)@remix-run/react
- Type-safety for single-fetch:defineLoader
,defineClientLoader
,defineAction
,defineClientAction
(#9372)@remix-run/react
- Single Fetch: Addundefined
touseActionData
type override (#9322)@remix-run/react
- Single Fetch: Allow anonce
to be set on single fetch stream transfer inline scripts via<RemixServer>
(#9364)@remix-run/server-runtime
- Single Fetch: Don't log thrown response stubs viahandleError
(#9369)@remix-run/server-runtime
- Single Fetch: Automatically wrap resource route naked object returns injson()
for back-compat in v2 (and log deprecation warning) (#9349)@remix-run/server-runtime
- Single Fetch: Passresponse
stub to resource route handlers (#9349)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.9.1...v2.9.2
v2.9.1
Compare Source
Date: 2024-04-24
Patch Changes
@remix-run/dev
- Fix issue where consumers who had added Remix packages to Vite'sssr.noExternal
option were being overridden by the Remix Vite plugin adding Remix packages to Vite'sssr.external
option (#9301)@remix-run/react
- Ignorefuture/*.d.ts
files from TS build (#9299)Changes by Package
@remix-run/dev
@remix-run/react
Full Changelog:
v2.9.0...v2.9.1
v2.9.0
Compare Source
Date: 2024-04-23
What's Changed
Single Fetch (unstable)
2.9.0
introduces afuture.unstable_singleFetch
flag to enable to Single Fetch behavior (RFC) in your Remix application. Please refer to the docs for the full detail but the high-level changes to be aware of include:loader
/action
functions are no longer automatically serialized to JSON responsesturbo-stream
which allows direct serialization of more complex types such asPromise
,Date
,Map
instances, and moretsconfig.json
'scompilerOptions.types
array to infer types properly when using Single Fetchheaders
export is no longer used when Single Fetch is enabled in favor of a newresponse
stub passed to yourloader
/action
functionsjson
/defer
/redirect
utilities are deprecated when using Single Fetch (but still work mostly the same)4xx
/5xx
responses - you can return a2xx
to opt-into revalidation or useshouldRevalidate
Undici
Remix
2.9.0
adds a newinstallGlobals({ nativeFetch: true })
flag to opt into usingundici
for the Web Fetch polyfills instead of the@remix-run/web-*
packages. This change has a few primary benefits:undici
, so beware of "breaking bug fixes" and keep an eye on any advancedfetch
API interactions you're performing in your appundici
may have different behavior by design -- most notably,undici
's garbage collection behavior differs and you are required to consume all fetch response bodies to avoid a memory leak in your appundici
is the fetch implementation used bynode
internally, it should better prepare Remix apps to more smoothly drop the polyfill to use the built-in Node.js APIs onnode
20+Minor Changes
future.unstable_singleFetch
flag (#8773, #9073, #9084, #9272)@remix-run/node
- Add a newinstallGlobals({ nativeFetch: true })
flag to opt-into usingundici
as the fetch polyfill instead of@remix-run/web-*
(#9106, #9111, #9198)@remix-run/server-runtime
- AddResponseStub
header interface and deprecate theheaders
export when Single Fetch is enabled (#9142)Patch Changes
create-remix
- Allow.
in repo name when using--template
flag (#9026)@remix-run/dev
- ImprovegetDependenciesToBundle
resolution in monorepos (#8848)@remix-run/dev
- Fix SPA mode when Single Fetch is enabled by using streamingentry.server
(#9063)@remix-run/dev
- Vite: added sourcemap support for transformed routes (#8970)@remix-run/dev
- Update links printed to the console by the Remix CLI/Dev Server to point to updated docs locations (#9176)@remix-run/server-runtime
- Handle redirects created byhandleDataRequest
(#9104)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.8.1...v2.9.0
v2.8.1
Compare Source
Date: 2024-03-07
Patch Changes
@remix-run/dev
- Vite: Support reading from Vite config when runningremix reveal
andremix routes
CLI commands (#8916)@remix-run/dev
- Vite: Clean up redundant client route query strings on route JavaScript files in production builds (#8969)@remix-run/dev
- Vite: Add vite commands to Remix CLI--help
output (#8939)@remix-run/dev
- Vite: Fix support forbuild.sourcemap
option in Vite config (#8965)@remix-run/dev
- Vite: Fix error when using Vite'sserver.fs.allow
option without a client entry file (#8966)@remix-run/react
- Strengthen the internalLayoutComponent
type to accept limited children (#8910)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.8.0...v2.8.1
v2.8.0
Compare Source
Date: 2024-02-28
Minor Changes
@remix-run/dev
- Vite: Pass resolvedviteConfig
to Remix Vite plugin'sbuildEnd
hook (#8885)Patch Changes
@remix-run/dev
- MarkLayout
as browser safe route export inesbuild
compiler (#8842)@remix-run/dev
- Vite: Silence build warnings when dependencies include"use client"
directives (#8897)@remix-run/dev
- Vite: FixserverBundles
issue where multiple browser manifests are generated (#8864)@remix-run/dev
- Vite: Support custombuild.assetsDir
option (#8843)@remix-run/react
- Fix the default rootErrorBoundary
component so it leverages the user-providedLayout
component (#8859)@remix-run/react
- Fix the default rootHydrateFallback
component so it leverages any user-providedLayout
component (#8892)Updated Dependencies
[email protected]
@remix-run/[email protected]
Changes by Package
create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog:
v2.7.2...v2.8.0
v2.7.2
Compare Source
Date: 2024-02-21
Patch Changes
@remix-run/dev
- Vite: Fix error when building projects with.css?url
imports (#8829)v2.7.1
Compare Source
Date: 2024-02-20
Patch Changes
@remix-run/cloudflare-pages
- Fix breaking change and restore Cloudflare event context fields ingetLoadContext
argument for backwards compatibility (#8819)v2.7.0
Compare Source
Date: 2024-02-20
What's Changed
Stabilized Vite Plugin
We're excited to announce that support for Vite is now stable in Remix
2.7.0
! Ever since the initial unstable release of Remix Vite, we’ve been hard at work refining and extending it over the past few months with help from all of our early adopters and community contributors. This also means that Vite-only features such as SPA Mode, Server Bundles, andbasename
support are now officially stable as well 😊.For more information, check out the blog post and the Vite docs.
New
Layout
ExportWe've found that it's super common to create your own component in your root route to hold the shared layout/app shell between your
Component
/ErrorBoundary
/HydrateFallback
. This is so common (and can also cause some minor edge-case issues such as a FOUC on hydration) that we've incorporated this as a first-class API in2.7.0
.You can now export an optional
Layout
component from your root route which will be provided your route component, ErrorBoundary, or HydrateFallback as it'schildren
. For more information, please see theLayout
docs and the RFC.Basename support
React Router has long supported a
basename
config that allows you to serve your app within a subpath such ashttp://localhost/myapp/*
without having to include the/myapp
segment in all of your route paths. This was originally omitted from Remix because v1 nested folders file-convention made it pretty easy to put your route files in aroutes/myapp/
folder, giving you the same functionality. There has also been an open proposal from the community to add this functionality.Two things have since changed that made us reconsider the lack of
basename
support:myapp.
compared to the nested folder conventionbase
config which is often (and easily) confused with the concept of a React Routerbasename
(when in reality it's more aligned with the old RemixpublicPath
config)In
2.7.0
we've added support for abasename
in the Vite plugin config. For more information, please check out thebasename
docs.Note: This is a Vite-only feature and is not available via the
esbuild
compiler.Cloudflare Proxy as a Vite Plugin
The Cloudflare preset (
unstable_cloudflarePreset
) as been removed and replaced with a new Vite plugin: