chore: Update version for release #6264
Merged
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 was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-next, this PR will be updated.
Releases
@remix-run/dev@1.16.0
Minor Changes
Enable support for CSS Modules, Vanilla Extract and CSS side-effect imports (#6046)
These CSS bundling features were previously only available via
future.unstable_cssModules
,future.unstable_vanillaExtract
andfuture.unstable_cssSideEffectImports
options inremix.config.js
, but they have now been stabilized.CSS Bundle Setup
In order to use these features, you first need to set up CSS bundling in your project. First install the
@remix-run/css-bundle
package.Then return the exported
cssBundleHref
as a stylesheet link descriptor from thelinks
function at the root of your app.CSS Modules
To use CSS Modules, you can opt in via the
.module.css
file name convention. For example:Vanilla Extract
To use Vanilla Extract, first install its
css
package as a dev dependency.You can then opt in via the
.css.ts
/.css.js
file name convention. For example:CSS Side-Effect Imports
Any CSS files that are imported as side-effects (e.g.
import "./styles.css"
) will be automatically included in the CSS bundle.Since JavaScript runtimes don't support importing CSS in this way, you'll also need to add any packages using CSS side-effect imports to the
serverDependenciesToBundle
option in yourremix.config.js
file. This ensures that any CSS imports are compiled out of your code before running it on the server. For example, to use React Spectrum:The Remix dev server spins up your app server as a managed subprocess. (#6133)
This keeps your development environment as close to production as possible.
It also means that the Remix dev server is compatible with any app server.
By default, the dev server will use the Remix App Server, but you opt to use your own app server by specifying the command to run it via the
-c
/--command
flag:The dev server will:
NODE_ENV=development
and warn you if it was previously set to something elseApp server coordination
In order to manage your app server, the dev server needs to be told what server build is currently being used by your app server.
This works by having the app server send a "I'm ready!" message with the Remix server build hash as the payload.
This is handled automatically in Remix App Server and is set up for you via calls to
broadcastDevReady
orlogDevReady
in the official Remix templates.If you are not using Remix App Server and your server doesn't call
broadcastDevReady
, you'll need to call it in your app server after it is up and running.For example, in an Express server:
Options
Options priority order is: 1. flags, 2. config, 3. defaults.
-c
/--command
command
remix-serve <server build path>
--http-scheme
httpScheme
http
--http-host
httpHost
localhost
--http-port
httpPort
--websocket-port
websocketPort
--no-restart
restart: false
restart: true
🚨 The
--http-*
flags are only used for internal dev server <-> app server communication.Your app will run on your app server's normal URL.
To set
unstable_dev
configuration, replaceunstable_dev: true
withunstable_dev: { <options> }
.For example, to set the HTTP(S) port statically:
SSL and custom hosts
You should only need to use the
--http-*
flags and--websocket-port
flag if you need fine-grain control of what scheme/host/port for the dev server.If you are setting up SSL or Docker networking, these are the flags you'll want to use.
🚨 Remix will not set up SSL and custom host for you.
The
--http-scheme
and--http-host
flag are for you to tell Remix how you've set things up.It is your task to set up SSL certificates and host files if you want those features.
--no-restart
andrequire
cache purgingIf you want to manage server changes yourself, you can use the
--no-restart
flag to tell the dev server to refrain from restarting your app server when builds succeed:remix dev -c "node ./server.js" --no-restart
For example, you could purge the
require
cache of your app server to keep it running while picking up server changes.If you do so, you should watch the server build path (
build/
by default) for changes and only purge therequire
cache when changes are detected.🚨 If you use
--no-restart
, it is your responsibility to callbroadcastDevReady
when your app server has picked up server changes.For example, with
chokidar
:Stabilize built-in PostCSS support via the new
postcss
option inremix.config.js
. As a result, thefuture.unstable_postcss
option has also been deprecated. (#5960)The
postcss
option isfalse
by default, but when set totrue
will enable processing of all CSS files using PostCSS ifpostcss.config.js
is present.If you followed the original PostCSS setup guide for Remix, you may have a folder structure that looks like this, separating your source files from its processed output:
After you've enabled the new
postcss
option, you can delete the processed files fromapp/styles
folder and move your source files fromstyles
toapp/styles
:You should then remove
app/styles
from your.gitignore
file since it now contains source files rather than processed output.You can then update your
package.json
scripts to remove any usage ofpostcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Stabilize built-in Tailwind support via the new
tailwind
option inremix.config.js
. As a result, thefuture.unstable_tailwind
option has also been deprecated. (#5960)The
tailwind
option isfalse
by default, but when set totrue
will enable built-in support for Tailwind functions and directives in your CSS files iftailwindcss
is installed.If you followed the original Tailwind setup guide for Remix and want to make use of this feature, you should first delete the generated
app/tailwind.css
.Then, if you have a
styles/tailwind.css
file, you should move it toapp/tailwind.css
.Otherwise, if you don't already have an
app/tailwind.css
file, you should create one with the following contents:You should then remove
/app/tailwind.css
from your.gitignore
file since it now contains source code rather than processed output.You can then update your
package.json
scripts to remove any usage oftailwindcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Patch Changes
url()
rules when using CSS Modules, Vanilla Extract and CSS side-effect imports (#5788)$.jsx
) route from matching a root/
path" (#6222)$.jsx
) route from matching a root/
path (#6130)@remix-run/server-runtime@1.16.0
@remix-run/eslint-config@1.16.0
Minor Changes
@remix-run/eslint-config/jest
ESLint config (#5697)Patch Changes
@remix-run/react@1.16.0
Minor Changes
Enable support for CSS Modules, Vanilla Extract and CSS side-effect imports (#6046)
These CSS bundling features were previously only available via
future.unstable_cssModules
,future.unstable_vanillaExtract
andfuture.unstable_cssSideEffectImports
options inremix.config.js
, but they have now been stabilized.CSS Bundle Setup
In order to use these features, you first need to set up CSS bundling in your project. First install the
@remix-run/css-bundle
package.Then return the exported
cssBundleHref
as a stylesheet link descriptor from thelinks
function at the root of your app.CSS Modules
To use CSS Modules, you can opt in via the
.module.css
file name convention. For example:Vanilla Extract
To use Vanilla Extract, first install its
css
package as a dev dependency.You can then opt in via the
.css.ts
/.css.js
file name convention. For example:CSS Side-Effect Imports
Any CSS files that are imported as side-effects (e.g.
import "./styles.css"
) will be automatically included in the CSS bundle.Since JavaScript runtimes don't support importing CSS in this way, you'll also need to add any packages using CSS side-effect imports to the
serverDependenciesToBundle
option in yourremix.config.js
file. This ensures that any CSS imports are compiled out of your code before running it on the server. For example, to use React Spectrum:Stabilize built-in PostCSS support via the new
postcss
option inremix.config.js
. As a result, thefuture.unstable_postcss
option has also been deprecated. (#5960)The
postcss
option isfalse
by default, but when set totrue
will enable processing of all CSS files using PostCSS ifpostcss.config.js
is present.If you followed the original PostCSS setup guide for Remix, you may have a folder structure that looks like this, separating your source files from its processed output:
After you've enabled the new
postcss
option, you can delete the processed files fromapp/styles
folder and move your source files fromstyles
toapp/styles
:You should then remove
app/styles
from your.gitignore
file since it now contains source files rather than processed output.You can then update your
package.json
scripts to remove any usage ofpostcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Stabilize built-in Tailwind support via the new
tailwind
option inremix.config.js
. As a result, thefuture.unstable_tailwind
option has also been deprecated. (#5960)The
tailwind
option isfalse
by default, but when set totrue
will enable built-in support for Tailwind functions and directives in your CSS files iftailwindcss
is installed.If you followed the original Tailwind setup guide for Remix and want to make use of this feature, you should first delete the generated
app/tailwind.css
.Then, if you have a
styles/tailwind.css
file, you should move it toapp/tailwind.css
.Otherwise, if you don't already have an
app/tailwind.css
file, you should create one with the following contents:You should then remove
/app/tailwind.css
from your.gitignore
file since it now contains source code rather than processed output.You can then update your
package.json
scripts to remove any usage oftailwindcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Patch Changes
6.11.0-pre.2
(#6223)useSyncExternalStore
(#6121)react-router-dom@6.11.0
/@remix-run/router@1.6.0
(#6233)@remix-run/server-runtime@1.16.0
Minor Changes
Enable support for CSS Modules, Vanilla Extract and CSS side-effect imports (#6046)
These CSS bundling features were previously only available via
future.unstable_cssModules
,future.unstable_vanillaExtract
andfuture.unstable_cssSideEffectImports
options inremix.config.js
, but they have now been stabilized.CSS Bundle Setup
In order to use these features, you first need to set up CSS bundling in your project. First install the
@remix-run/css-bundle
package.Then return the exported
cssBundleHref
as a stylesheet link descriptor from thelinks
function at the root of your app.CSS Modules
To use CSS Modules, you can opt in via the
.module.css
file name convention. For example:Vanilla Extract
To use Vanilla Extract, first install its
css
package as a dev dependency.You can then opt in via the
.css.ts
/.css.js
file name convention. For example:CSS Side-Effect Imports
Any CSS files that are imported as side-effects (e.g.
import "./styles.css"
) will be automatically included in the CSS bundle.Since JavaScript runtimes don't support importing CSS in this way, you'll also need to add any packages using CSS side-effect imports to the
serverDependenciesToBundle
option in yourremix.config.js
file. This ensures that any CSS imports are compiled out of your code before running it on the server. For example, to use React Spectrum:The Remix dev server spins up your app server as a managed subprocess. (#6133)
This keeps your development environment as close to production as possible.
It also means that the Remix dev server is compatible with any app server.
By default, the dev server will use the Remix App Server, but you opt to use your own app server by specifying the command to run it via the
-c
/--command
flag:The dev server will:
NODE_ENV=development
and warn you if it was previously set to something elseApp server coordination
In order to manage your app server, the dev server needs to be told what server build is currently being used by your app server.
This works by having the app server send a "I'm ready!" message with the Remix server build hash as the payload.
This is handled automatically in Remix App Server and is set up for you via calls to
broadcastDevReady
orlogDevReady
in the official Remix templates.If you are not using Remix App Server and your server doesn't call
broadcastDevReady
, you'll need to call it in your app server after it is up and running.For example, in an Express server:
Options
Options priority order is: 1. flags, 2. config, 3. defaults.
-c
/--command
command
remix-serve <server build path>
--http-scheme
httpScheme
http
--http-host
httpHost
localhost
--http-port
httpPort
--websocket-port
websocketPort
--no-restart
restart: false
restart: true
🚨 The
--http-*
flags are only used for internal dev server <-> app server communication.Your app will run on your app server's normal URL.
To set
unstable_dev
configuration, replaceunstable_dev: true
withunstable_dev: { <options> }
.For example, to set the HTTP(S) port statically:
SSL and custom hosts
You should only need to use the
--http-*
flags and--websocket-port
flag if you need fine-grain control of what scheme/host/port for the dev server.If you are setting up SSL or Docker networking, these are the flags you'll want to use.
🚨 Remix will not set up SSL and custom host for you.
The
--http-scheme
and--http-host
flag are for you to tell Remix how you've set things up.It is your task to set up SSL certificates and host files if you want those features.
--no-restart
andrequire
cache purgingIf you want to manage server changes yourself, you can use the
--no-restart
flag to tell the dev server to refrain from restarting your app server when builds succeed:remix dev -c "node ./server.js" --no-restart
For example, you could purge the
require
cache of your app server to keep it running while picking up server changes.If you do so, you should watch the server build path (
build/
by default) for changes and only purge therequire
cache when changes are detected.🚨 If you use
--no-restart
, it is your responsibility to callbroadcastDevReady
when your app server has picked up server changes.For example, with
chokidar
:Stabilize built-in PostCSS support via the new
postcss
option inremix.config.js
. As a result, thefuture.unstable_postcss
option has also been deprecated. (#5960)The
postcss
option isfalse
by default, but when set totrue
will enable processing of all CSS files using PostCSS ifpostcss.config.js
is present.If you followed the original PostCSS setup guide for Remix, you may have a folder structure that looks like this, separating your source files from its processed output:
After you've enabled the new
postcss
option, you can delete the processed files fromapp/styles
folder and move your source files fromstyles
toapp/styles
:You should then remove
app/styles
from your.gitignore
file since it now contains source files rather than processed output.You can then update your
package.json
scripts to remove any usage ofpostcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Stabilize built-in Tailwind support via the new
tailwind
option inremix.config.js
. As a result, thefuture.unstable_tailwind
option has also been deprecated. (#5960)The
tailwind
option isfalse
by default, but when set totrue
will enable built-in support for Tailwind functions and directives in your CSS files iftailwindcss
is installed.If you followed the original Tailwind setup guide for Remix and want to make use of this feature, you should first delete the generated
app/tailwind.css
.Then, if you have a
styles/tailwind.css
file, you should move it toapp/tailwind.css
.Otherwise, if you don't already have an
app/tailwind.css
file, you should create one with the following contents:You should then remove
/app/tailwind.css
from your.gitignore
file since it now contains source code rather than processed output.You can then update your
package.json
scripts to remove any usage oftailwindcss
since Remix handles this automatically. For example, if you had followed the original setup guide:Patch Changes
react-router-dom@6.11.0
/@remix-run/router@1.6.0
(#6233)AppLoadContext
tohandleRequest
(#5836)@remix-run/testing@1.16.0
Minor Changes
Enable support for CSS Modules, Vanilla Extract and CSS side-effect imports (#6046)
These CSS bundling features were previously only available via
future.unstable_cssModules
,future.unstable_vanillaExtract
andfuture.unstable_cssSideEffectImports
options inremix.config.js
, but they have now been stabilized.CSS Bundle Setup
In order to use these features, you first need to set up CSS bundling in your project. First install the
@remix-run/css-bundle
package.Then return the exported
cssBundleHref
as a stylesheet link descriptor from thelinks
function at the root of your app.CSS Modules
To use CSS Modules, you can opt in via the
.module.css
file name convention. For example:Vanilla Extract
To use Vanilla Extract, first install its
css
package as a dev dependency.You can then opt in via the
.css.ts
/.css.js
file name convention. For example:CSS Side-Effect Imports
Any CSS files that are imported as side-effects (e.g.
import "./styles.css"
) will be automatically included in the CSS bundle.Since JavaScript runtimes don't support importing CSS in this way, you'll also need to add any packages using CSS side-effect imports to the
serverDependenciesToBundle
option in yourremix.config.js
file. This ensures that any CSS imports are compiled out of your code before running it on the server. For example, to use React Spectrum:Patch Changes
6.11.0-pre.2
(#6223)react-router-dom@6.11.0
/@remix-run/router@1.6.0
(#6233)@remix-run/react@1.16.0
@remix-run/node@1.16.0
create-remix@1.16.0
Patch Changes
@remix-run/dev@1.16.0
@remix-run/architect@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/node@1.16.0
@remix-run/cloudflare@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/server-runtime@1.16.0
@remix-run/cloudflare-pages@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/cloudflare@1.16.0
@remix-run/cloudflare-workers@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/cloudflare@1.16.0
@remix-run/css-bundle@1.16.0
Patch Changes
@remix-run/dev@1.16.0
@remix-run/deno@1.16.0
Patch Changes
@remix-run/server-runtime@1.16.0
@remix-run/express@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/node@1.16.0
@remix-run/netlify@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/node@1.16.0
@remix-run/node@1.16.0
Patch Changes
@remix-run/node/install
side-effect to allownode --require @remix-run/node/install
(#6132)@remix-run/server-runtime@1.16.0
@remix-run/serve@1.16.0
Patch Changes
@remix-run/node/install
side-effect to allownode --require @remix-run/node/install
(#6132)@remix-run/express@1.16.0
@remix-run/node@1.16.0
@remix-run/vercel@1.16.0
Patch Changes
getLoadContext
in all adapters (#6170)@remix-run/node@1.16.0
remix@1.16.0
remix
See the
CHANGELOG.md
in individual Remix packages for all changes.