Build extension
Rsbuild
Rspress builds docs with Rsbuild.
Configure Rsbuild
Rsbuild provides a rich set of build options. Customize them through builderConfig. For example, change the output directory to doc_dist:
rspress.config.ts
Rspress also provides builderConfig.plugins for registering Rsbuild plugins. Use Rsbuild's plugin ecosystem to extend build behavior.
For example, add Google Analytics with rsbuild-plugin-google-analytics:
rspress.config.ts
Tip
Learn more in the Rsbuild - Config documentation.
Configure Rspack
You can configure Rspack through the tools.rspack option provided by Rsbuild:
rspress.config.ts
MDX compilation
Rspress compiles MDX with unified. Add related compilation plugins through the markdown configuration. For example:
rspress.config.ts