Get up to speed quickly with a new Rspack based project.
You can scaffold a simple project setup using Rsbuild directly. Invoke the following command:
Then follow the input prompts in your terminal.
You can scaffold a simple project setup using the Rspack CLI directly. Invoke the following command:
Then follow the input prompts in your terminal.
There are already a few Rspack-based toolchains in the community:
Rsbuild is an Rspack-based build tool for the web. The main goal of Rsbuild is to provide out-of-the-box build capabilities for Rspack users, allowing developers to start a web project with zero configuration.
Rsbuild integrates high-performance Rust-based tools from the community, including Rspack and SWC, to provide first-class build speed and development experience.
Learn more about Rsbuild in the official documentation.
If you need to migrate a Create React App (CRA) application to Rspack, you can follow the CRA migration guide and use Rsbuild for a quick migration.
Rspress is a static site generator based on Rspack. It provides a complete solution for building static sites and includes the following features:
Learn more about Rspress in the official documentation.
Modern.js Framework is a Rspack-based progressive React framework that provides a complete solution for building web applications. It supports nested routes, server-side rendering, and provides out-of-the-box CSS solutions such as styled components and Tailwind CSS.
Learn more about Modern.js in the official documentation.
The fastest way to get up to speed quickly and leverage Rspack and React in a production-ready setting is to use the dedicated Rspack Nx plugin. This gives you a pre-configured setup, integrating Rspack with React, TypeScript, ESLint, Jest, and Cypress for e2e testing.
Run the following command to set up a new Nx workspace with React and Rspack:
The pre-configured setup is already ready to work with Rspack, TypeScript, TSX and React. In addition it also comes with Jest and Cypress for testing and ESLint for linting.
Once created you can simply npm start
(or pnpm start
or yarn start
) to start the development server. You can also run npm run build
(or pnpm run build
or yarn run build
) to build the application for production and similarly run npm run test
(or pnpm run test
or yarn run test
) to run the unit tests.
You can learn more about Nx at https://nx.dev.
We'll start by creating a project directory, generating an NPM package.json
, and then installing @rspack/cli
locally: