Before getting started, you will need to install Node.js, and ensure that your Node.js version is not lower than 16. We recommend using the LTS version of Node.js 18.
You can check the currently used Node.js version with the following command:
If you do not have Node.js installed in your current environment, or the installed version is lower than 16, you can use nvm or fnm to install the required version.
Here is an example of how to install the Node.js 18 LTS version via nvm:
Both nvm and fnm are Node.js version management tools. Relatively speaking, nvm is more mature and stable, while fnm is implemented using Rust, which provides better performance than nvm.
You can use the create-rsbuild
to create a new Rsbuild project. Just execute the following command:
Then follow the prompts to complete the operation. You can choose from the following templates provided by create-rsbuild
:
Template | Description | Optional Features |
---|---|---|
react | React 18 | TypeScript |
vue3 | Vue 3 | TypeScript |
vue2 | Vue 2 | TypeScript |
lit | Lit | TypeScript |
preact | Preact | TypeScript |
svelte | Svelte | TypeScript |
solid | Solid | TypeScript |
vanilla | Vanilla JavaScript | TypeScript |
If you need to migrate from an existing project to Rsbuild, you can refer to the following guides:
Rsbuild comes with a lightweight CLI that includes commands such as dev
and build
.
Refer to the CLI Tool to learn about all available commands and options.
By default, Rsbuild CLI uses src/index.(js|ts|jsx|tsx)
as the entry module. You can modify the entry module using the source.entry option.
You may want: