Run Rspack via an executor for a project.
@nx/rspack
Package reference
Here is a list of all the executors, generators and migrations available from this package.
Executors
Run @rspack/dev-server to serve a project.
Serve a SSR application.
Serve a host or remote application.
module-federation-ssr-dev-server
Serve a host application along with it's known remotes.
module-federation-static-server
Serve a host and its remotes statically.
Generators
Rspack configuration generator.
initInternal
Rspack init generator.
presetInternal
React preset generator.
React application generator.
Convert a webpack application to use rspack.
convert-config-to-rspack-plugin
Convert the project to use the
NxAppRspackPlugin
andNxReactRspackPlugin
.Convert existing Rspack project(s) using
@nx/rspack:rspack
executor to use@nx/rspack/plugin
.
Migrations
21.0.x
20.5.x
20.3.x
20.2.x
19.7.x
19.3.x
21.0.1-package-updates
Packages
Name | Version | Always Add to package.json |
---|---|---|
@rspack/core | ^1.3.8 | Update only |
@rspack/dev-server | ^1.1.1 | Update only |
20.5.0-package-updates
Packages
Name | Version | Always Add to package.json |
---|---|---|
sass-loader | ^16.0.4 | Update only |
@rspack/core | ^1.2.2 | Update only |
ensure-nx-module-federation-package
If workspace includes Module Federation projects, ensure the new @nx/module-federation package is installed.
Ensure the @nx/module-federation Package is Installed
If workspace includes Module Federation projects, ensure the new @nx/module-federation
package is installed.
Sample Code Changes
1{
2 "dependencies": {}
3}
4
20.2.0-package-updates
Packages
Name | Version | Always Add to package.json |
---|---|---|
@rspack/core | ^1.1.5 | Update only |
@rspack/dev-server | ^1.0.9 | Update only |
update-20-2-0-update-with-module-federation-import
Update the withModuleFederation import use @nx/module-federation/rspack.
Migrate withModuleFederation Import to New Package
Update the withModuleFederation import to use @nx/module-federation/rspack.
Sample Code Changes
Update import paths for withModuleFederation
and withModuleFederationForSSR
.
1import {
2 withModuleFederation,
3 withModuleFederationForSSR,
4} from '@nx/rspack/module-federation';
5
19.7.0-package-updates
Packages
Name | Version | Always Add to package.json |
---|---|---|
@rspack/core | ^1.0.0 | Update only |
@rspack/dev-server | ^1.0.0 | Update only |
@rspack/plugin-react-refresh | ^1.0.0 | Update only |
19.3.0-package-updates
Packages
Name | Version | Always Add to package.json |
---|---|---|
@rspack/core | ^0.7.5 | Update only |
@rspack/dev-server | ^0.7.5 | Update only |
@rspack/plugin-minify | ^0.7.5 | Update only |