-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update remix monorepo to v2 (major) #260
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/major-remix-monorepo
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.
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/major-remix-monorepo
branch
from
September 21, 2023 22:37
e8890a5
to
e35babc
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
October 16, 2023 19:19
e35babc
to
8d8d23e
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
October 31, 2023 16:59
8d8d23e
to
65c4e95
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
November 22, 2023 19:34
f4383a1
to
b27d90d
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
December 13, 2023 23:50
b27d90d
to
07fa494
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
December 22, 2023 18:13
07fa494
to
1862570
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
January 11, 2024 18:37
1862570
to
fb3d013
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
January 18, 2024 23:03
fb3d013
to
290318a
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
February 1, 2024 22:00
290318a
to
471dce6
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
3 times, most recently
from
February 21, 2024 18:58
4c55242
to
fa2ab73
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
February 29, 2024 01:05
e18b030
to
76ca812
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
March 7, 2024 21:42
76ca812
to
ff4014d
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
April 24, 2024 16:59
0ef0f8b
to
d6b45a9
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
May 10, 2024 19:56
d6b45a9
to
f4c42ea
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
June 25, 2024 15:40
f4c42ea
to
dd74caa
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
3 times, most recently
from
July 4, 2024 13:53
ca9c7dc
to
42bd9ff
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
July 16, 2024 17:43
42bd9ff
to
73350a5
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
August 5, 2024 21:43
651afac
to
606548e
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
August 15, 2024 19:06
df60b6a
to
ca42e7c
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
September 9, 2024 19:18
ca42e7c
to
7495ae4
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
September 19, 2024 20:24
7495ae4
to
45392d5
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
2 times, most recently
from
October 12, 2024 01:20
afe7295
to
0760e98
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
November 9, 2024 01:58
0760e98
to
892d22e
Compare
renovate
bot
force-pushed
the
renovate/major-remix-monorepo
branch
from
November 22, 2024 10:19
892d22e
to
e754f45
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.11.1
->2.15.0
1.11.1
->2.15.0
1.11.1
->2.15.0
1.11.1
->2.15.0
1.11.1
->2.15.0
Release Notes
remix-run/remix (@remix-run/dev)
v2.15.0
Compare Source
Patch Changes
Stabilize the
future.v3_routeConfig
future flag, replacingfuture.unstable_routeConfig
. This enables support forroutes.ts
to assist with the migration to React Router v7. (#10236)Note that if you had already enabled the
future.unstable_routeConfig
flag, your route config inapp/routes.ts
is no longer defined via theroutes
export and must now be defined via the default export.Updated dependencies:
@remix-run/[email protected]
@remix-run/[email protected]
v2.14.0
Compare Source
Minor Changes
Add support for
routes.ts
behindfuture.unstable_routeConfig
flag to assist with the migration to React Router v7. (#10107)Config-based routing is the new default in React Router v7, configured via the
routes.ts
file in the app directory. Support forroutes.ts
and its related APIs in Remix are designed as a migration path to help minimize the number of changes required when moving your Remix project over to React Router v7. While some new packages have been introduced within the@remix-run
scope, these new packages only exist to keep the code inroutes.ts
as similar as possible to the equivalent code for React Router v7.When the
unstable_routeConfig
future flag is enabled, Remix's built-in file system routing will be disabled and your project will opted into React Router v7's config-based routing.To enable the flag, in your
vite.config.ts
file:A minimal
routes.ts
file to support Remix's built-in file system routing looks like this:Log deprecation warnings for v3 future flags (#10126)
@deprecated
annotations tojson
/defer
utilitiesPatch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.13.1
Compare Source
Patch Changes
future.v3_optimizeDeps
back tofuture.unstable_optimizeDeps
as it was not intended to stabilize in Remix v2 (#10099)@remix-run/[email protected]
@remix-run/[email protected]
v2.13.0
Compare Source
Minor Changes
future.unstable_optimizeDeps
flag intofuture.v3_optimizeDeps
(#10092)unstable_dataStrategy
->dataStrategy
unstable_patchRoutesOnNavigation
->patchRoutesOnNavigation
unstable_data()
->data()
unstable_viewTransition
->viewTransition
(Link
,Form
,navigate
,submit
)unstable_flushSync>
-><Link viewTransition>
(Link
,Form
,navigate
,submit
,useFetcher
)future.unstable_singleFetch
->future.v3_singleFetch
future.unstable_lazyRouteDiscovery
->future.v3_lazyRouteDiscovery
Patch Changes
Stop passing
request.signal
as therenderToReadableStream
signal
to abort server rendering for cloudflare/deno runtimes because by the time thatrequest
is aborted, aborting the rendering is useless because there's no way for React to flush down the unresolved boundaries (#10047)remix vite:dev
because we were incorrectly aborting requests after successful renders - which was causing us to abort a completed React render, and try to close an already closedReadableStream
.request.signal
on successful rendersentry.server
files no longer pass asignal
torenderToReadableStream
because adding a timeout-based abort signal to the default behavior would constitute a breaking changeentry.server
viaremix reveal entry.server
, and the template entry.server files have been updated with an example approach for newly created Remix appsFix adapter logic for aborting
request.signal
so we don't incorrectly abort on theclose
event for successful requests (#10046)Updated dependencies:
@remix-run/[email protected]
@remix-run/[email protected]
v2.12.1
Compare Source
Patch Changes
request.signal
duringvite dev
when the node response is closed (#9976)?inline
,?inline-css
and?raw
are no longer incorrectly injected during SSR in development (#9910)@remix-run/[email protected]
@remix-run/[email protected]
v2.12.0
Compare Source
Minor Changes
future.unstable_optimizeDeps
flag for automatic dependency optimization (#9921)future.unstable_optimizeDeps
future flagGuides
>Dependency optimization
optimizeDeps.entries
nor do you need to disable theremix-dot-server
pluginPatch Changes
dest 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/[email protected]
@remix-run/[email protected]
v2.11.2
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.11.1
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.11.0
Compare Source
Minor Changes
future.unstable_fogOfWar
tofuture.unstable_lazyRouteDiscovery
for clarity (#9763)Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.10.3
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.10.2
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.10.1
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.10.0
Compare Source
Patch Changes
express
dependency to^4.19.2
(#9184)@remix-run/[email protected]
@remix-run/[email protected]
v2.9.2
Compare Source
Patch Changes
dest already exists
error when runningremix vite:build
(#9305)@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)?client-route=1
imports in development (#9395)react-refresh
Babel transform within the Remix Vite plugin (#9241)@remix-run/[email protected]
@remix-run/[email protected]
v2.9.1
Compare Source
Patch Changes
ssr.noExternal
option were being overridden by the Remix Vite plugin adding Remix packages to Vite'sssr.external
option (#9301)@remix-run/[email protected]
@remix-run/[email protected]
v2.9.0
Compare Source
Minor Changes
New
future.unstable_singleFetch
flag (#8773)turbo-stream
soDate
's will becomeDate
throughuseLoaderData()
Promise
's without needing to usedefer()
- including nestedPromise
'sdefer
utility<RemixServer abortDelay>
is no longer used. Instead, you shouldexport const streamTimeout
fromentry.server.tsx
and the remix server runtime will use that as the delay to abort the streamed responserenderToPipeableStream
. You should always ensure that react is aborted afer the stream is aborted so that abort rejections can be flushed downfuture.unstable_skipActionErrorRevalidation
flag) - you can return a 2xx to opt-into revalidation or useshouldRevalidate
Patch Changes
getDependenciesToBundle
resolution in monorepos (#8848)@remix-run/[email protected]
@remix-run/[email protected]
v2.8.1
Compare Source
Patch Changes
remix reveal
andremix routes
CLI commands (#8916)--help
output (#8939)build.sourcemap
option in Vite config (#8965)server.fs.allow
option without a client entry file (#8966)@remix-run/[email protected]
@remix-run/[email protected]
v2.8.0
Compare Source
Minor Changes
viteConfig
to Remix Vite plugin'sbuildEnd
hook (#8885)Patch Changes
Layout
as browser safe route export inesbuild
compiler (#8842)serverBundles
issue where multiple browser manifests are generated (#8864)build.assetsDir
option (#8843)@remix-run/[email protected]
@remix-run/[email protected]
v2.7.2
Compare Source
Patch Changes
.css?url
imports (#8829)@remix-run/[email protected]
@remix-run/[email protected]
v2.7.1
Compare Source
Patch Changes
@remix-run/[email protected]
@remix-run/[email protected]
v2.7.0
Compare Source
Minor Changes
Allow an optional
Layout
export 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:remixCloudflareDevProxy
must come before theremix
plugin so that it can override Vite's dev server middleware to be compatible with Cloudflare's proxied environment.Because it is a Vite plugin,
remixCloudflareDevProxy
can setssr.resolve.externalConditions
to beworkerd
-compatible for you.remixCloudflareDevProxy
accepts agetLoadContext
function that replaces the oldgetRemixDevLoadContext
.If you were using a
nightly
version that requiredgetBindingsProxy
orgetPlatformProxy
, that is no longer required.Any options you were passing to
getBindingsProxy
orgetPlatformProxy
should now be passed toremixCloudflareDevProxy
instead.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
basename
option to the Vite plugin, allowing users to set the internal React Routerbasename
in 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
file
will be unnormalized Windows path with\
instead of/
.Vite: Pass
remixUserConfig
to presetremixConfig
hook (#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?url
imports (#8723)Fix type error in Remix config for synchronous
routes
function (#8745)Vite: Support Vite v5.1.0's
.css?url
imports (#8684)Always ignore route files starting with
.
(#8801)Vite: Enable use of
vite preview
to preview Remix SPA applications (#8624)npm run start
has been renamed tonpm run preview
which usesvite preview
instead of a standalone HTTP server such ashttp-server
orserv-cli
Vite: Remove the ability to pass
publicPath
as an option to the Remix vite plugin (#8145)publicPath
base
config so we now set the RemixpublicPath
from the Vitebase
configVite: 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/[email protected]
@remix-run/[email protected]
v2.6.0
Compare Source
Minor Changes
future.v3_throwAbortReason
flag to throwrequest.signal.reason
when a request is aborted instead of anError
such asnew Error("query() call aborted: GET /path")
(#8251)Patch Changes
Vite: Add
manifest
option to Vite plugin to enable writing a.remix/manifest.json
file to the build directory (#8575)This is a breaking change for consumers of the Vite plugin's "server bundles" feature.
The
build/server/bundles.json
file 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 themanifest
option.Vite: Provide
Unstable_ServerBundlesFunction
andUnstable_VitePluginConfig
types (#8654)Vite: add
--sourcemapClient
and--sourcemapServer
flags 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
serverBundles
function 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
meta
for 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:Or 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:
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
presets
option 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 bespokeimplementation that was compatible with Vite.
Instead of all this indirection, now the Remix Vite plugin instructs the
<Scripts />
componentto automatically include Vite's client-side runtime and other dev-only scripts.
Vite: Add
buildEnd
hook (#8620)Vite: add dev load context option to Cloudflare preset (#8649)
Vite: Add
mode
field into generated server build (#8539)Vite: Only write Vite manifest files if
build.manifest
is enabled within the Vite config (#8599)This is a breaking change for consumers of Vite's
manifest.json
files.To explicitly enable generation of Vite manifest files, you must set
build.manifest
totrue
in your Vite config.Vite: reduce network calls for route modules during HMR (#8591)
Vite: Add new
buildDirectory
option with a default value of"build"
. This replaces the oldassetsBuildDirectory
andserverBuildDirectory
options 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
assetsBuildDirectory
andserverBuildDirectory
options.The Remix Vite plugin now builds into a single directory containing
client
andserver
directories. If you've customized your build output directories, you'll need to migrate to the newbuildDirectory
option, e.g.Vite: Remove
unstable
prefix fromserverBundles
option. (#8596)Vite: Write Vite manifest files to
build/.vite
directory rather than being nested withinbuild/client
andbuild/server
directories. (#8599)This is a breaking change for consumers of Vite's
manifest.json
files.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.json
andbuild/.vite/server-manifest.json
, orbuild/.vite/server-{BUNDLE_ID}-manifest.json
when using server bundles.Updated dependencies:
@remix-run/[email protected]
@remix-run/[email protected]
v2.5.1
Compare Source
Patch Changes
isSpaMode
to@remix-run/dev/server-build
virtual module (#8492)<!DOCTYPE html>
if not present to fix quirks mode warnings for SPA template (#8495)remix vite:build --profile
to generate a.cpuprofile
that can be shared or uploaded to speedscope.appp + enter
to start a new profiling session or stop the current sessionremix vite:dev --profile
to initialize the dev server with a running profiling session@remix-run/[email protected]
@remix-run/[email protected]
v2.5.0
Compare Source
Minor Changes
Add unstable support for "SPA Mode" (#8457)
You can opt into SPA Mode by setting
unstable_ssr: false
in your Remix Vite plugin config:Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:
Building in SPA Mode will generate an
index.html
file in your client assets directory:To run your SPA, you serve your client assets directory via an HTTP server:
For more information, please refer to the SPA Mode docs.
Add
unstable_serverBundles
option 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:
Patch Changes
Fix issue with
isbot
v4 released on 1/1/2024 (#8415)remix dev
will now add"isbot": "^4"
topackage.json
instead of usinglatest
entry.server
files to work with bothisbot@3
andisbot@4
for backwards-compatibility with Remix apps that have pinnedisbot
to v3isbot@4
moving forward viacreate-remix
Vite: Fix HMR issues when altering exports for non-rendered routes (#8157)
Vite: Default
NODE_ENV
to"production"
when runningremix vite:build
command (#8405)Vite: Remove Vite plugin config option
serverBuildPath
in favor of separateserverBuildDirectory
andserverBuildFile
options (#8332)Vite: Loosen strict route exports restriction, reinstating support for non-Remix route exports (#8420)
Updated dependencies:
@remix-run/[email protected]
@remix-run/[email protected]
v2.4.1
Compare Source
Patch Changes
Vite: Error messages when
.server
files are referenced by client (#8267).server
module from client code resulted in an error message like:The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'
answer.server.ts
does provide theisDateType
export, but Remix was replacing.server
modules with empty modules (export {}
) for the client build.server
module is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route moduleRemove
unstable_viteServerBuildModuleId
in 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/dev
could be inadvertently required in your server's production dependencies.Instead, you should manually write the virtual module name
"virtual:remix/server-build"
when callingssrLoadModule
in development.Vite: Fix errors for non-existent
index.html
importer (#8353)Add
vite:dev
andvite:build
commands 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
dev
andbuild
processes via the Remix CLI.Vite: Preserve names for exports from
.client
modules (#8200)Unlike
.server
modules, the main idea is not to prevent code from leaking into the server buildsince 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
.client
modules without compilation failing and then rely on runtime checksor otherwise ensure that execution only happens within a client-only context (e.g. event handlers,
useEffect
).Replacing
.client
modules 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
undefined
.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/[email protected]
@remix-run/[email protected]
v2.4.0
Compare Source
Minor Changes
Vite: exclude modules within
.server
directories from client build (#8154)Add support for
clientLoader
/clientAction
/HydrateFallback
route 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:
localStorage
)IndexedDB
)By default,
clientLoader
will 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=true
to 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
clientLoader
needs to run on hydration and adds data you require to render the route component, you can export aHydrateFallback
component that will render during SSR, and then your route component will not render until theclientLoader
has executed on hydration.clientAction
is simpler thanclientLoader
because it has no hydration use-cases.clientAction
will only run on client-side navigations.For more information, please refer to the
clientLoader
andclientAction
documentation.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_relativeSplatPath
flag to implement a breaking bug fix to relative routing when inside a splat route. For more information, please see the React Router6.21.0
Release Notes and theuseResolvedPath
docs. (#8216)Patch Changes
Upgrade Vite peer dependency range to v5 (#8172)
Support HMR for routes with
handle
export 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
public
directory. (#8077)This is a breaking change for projects using the unstable Vite plugin.
The server is now compiled into
build/server
rather thanbuild
, and the client is now compiled intobuild/client
rather thanpublic
.For more information on the changes and guidance on how to migrate your project, refer to the updated Remix Vite documentation.
Remove undocumented
legacyCssImports
option from Vite plugin due to issues with?url
imports of CSS files not being processed correctly in Vite (#8096)Vite: fix access to default
entry.{client,server}.tsx
within pnpm workspace on Windows (#8057)Remove
unstable_createViteServer
andunstable_loadViteServerBuild
which were only minimal wrappers around Vite'screateServer
andssrLoadModule
functions 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_viteServerBuildModuleId
so that custom servers interact with Vite directly rather than via Remix APIs, for example:Creating the Vite server in middleware mode:
Loading the Vite server build in the request handler:
Pass request handler errors to
vite.ssrFixStacktrace
in Vite dev to ensure stack traces correctly map to the original source code (#8066)Vite: Preserve names for exports from .client imports (#8200)
Unlike
.server
modules, the main idea is not to prevent code from leaking into the server buildsince 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
.client
modules without compilation failing and then rely on runtime checksto determine if the code is running on the server or client.
Replacing
.client
modules 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/node
to Vite'soptimizeDeps.include
array (#8177)Improve Vite plugin performance (#8121)
server.preTransformRequests
in Vite child compiler since it's only used to process route modulesRemove 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
installGlobals
in your Vite config instead.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 Request
checks when using Vite dev server (#8062)Updated dependencies:
@remix-run/[email protected]
@remix-run/[email protected]
v2.3.1
Compare Source
Patch Changes
nonce
prop onLiveReload
component in Vite dev (#8014)public
directory in Vite build (#8039)assetsBuildDirectory
was deeply nested within thepublic
directory@remix-run/[email protected]
@remix-run/[email protected]
v2.3.0
Compare Source
Patch Changes
LiveReload
component afterScripts
in Vite dev (#7919).jsx
files without manualReact
import in Vite (#7888)LiveReload
component in Vite dev (#7919)development
andproduction
modes are present, e.g.@mdx-js/rollup
. (#7911)process.env.NODE_ENV
values other than"development"
in Vite dev (#7980)/@​fs
(#7913)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.