You can create a Rspress project using the create-rspress
cli:
Input the project directory name, and then the cli will create the project for you.
First, you can create a new directory with the following command:
Execute npm init -y
to initialize a project. You can install Rspress using npm, yarn or pnpm:
Then create the file with the following command
Add the following script to package.json
:
Then initialize a configuration file rspress.config.ts
:
And then create tsconfig.json
, add the following config:
Start the local development service with the following command:
For the dev command, you can specify the port number or host of the development service with the --port
or --host
parameter, such as rspress dev --port 8080 --host 0.0.0.0
.
Build the production bundle with the following command :
By default, Rspress will set doc_build
as the output directory.
Start the local preview service with the following command: