Releases: web-infra-dev/rspress
v2.0.0-beta.22
Breaking Changes 🚨
Merge rspress
package to @rspress/core
package
related PR: #2386
It means rspress
package will be deprecated, please migrate the package name to the following package name.
rspress
=> @rspress/core
rspress/config
=> @rspress/core
rspress/theme
=> @rspress/core/theme
rspress/runtime
=> @rspress/core/runtime
rspress/shiki-transformers
=> @rspress/core/shiki-transformers
before
// rspress.config.ts
import { defineConfig } from 'rspress/config';
export default defineConfig({
});
// theme/index.ts
import { usePageData, useDark } from 'rspress/runtime';
import { HomeLayout } from 'rspress/theme'
after
// rspress.config.ts
import { defineConfig } from '@rspress/core';
export default defineConfig({
});
// theme/index.ts
import { usePageData, useDark } from '@rspress/core/runtime';
import { HomeLayout } from '@rspress/core/theme'
Migration Steps from V1
You can use the search and replace feature of the IDE to search for and replace the above package name.

Highlights ✨
ssg.experimentalWorker
based on tinypool to speed up ssg process
related PR: #2394
it is inspired by docusaurus 3.8, we introduced it so that large document sites (>=500 pages) can reduce memory usage and decrease SSG time.
it introduced a Node.js Worker Thread pool to run the SSG. With this new strategy, we can better leverage all the available CPUs, reduce static site generation time, and contain potential memory leaks.
// rspress.config.ts
import { defineConfig } from '@rspress/core';
export default defineConfig({
ssg: {
experimentalWorker: true
}
});
What's Changed
New Features 🎉
Performance 🚀
- perf(ssg): add
ssg.experimentalWorker
based on tinypool to speed up ssg process by @SoonIter in #2394
Bug Fixes 🐞
- fix(auto-nav-sidebar): custom link should support
collapsible
andcollapsed
like"type": dir
by @SoonIter in #2382 - fix!: remove
rspress
package,rspress
=>@rspress/core
rspress/theme
=>@rspress/core/theme
rspress/runtime
=>@rspress/core/runtime
by @SoonIter in #2386 - fix(fileCodeBlock): optimize the error message and fix
.length is not defined
by @SoonIter in #2387 - fix: use
_nav.json
in template by @Timeless0911 in #2391 - fix(ssg): ssg error with "base" configuration by @SoonIter in #2392
- fix(ssg): regression in V2, csr should also output html files for deploy by @SoonIter in #2393
- fix: use SocialLinks & SwitchAppearance components from theme by @jbroma in #2395
- fix(theme): aside should not cover the top buttons by @SoonIter in #2400
- fix(theme): aside should not cover the top buttons (#2400) by @SoonIter in #2401
- fix: directive node should have
name
field by @JounQin in #2403 - fix: search link with base by @JounQin in #2406
Other Changes
- chore(auto-nav-sidebar): update custom-link types by @SoonIter in #2383
- chore(deps): update dependency @rsbuild/plugin-less to ~1.3.0 by @renovate[bot] in #2397
- chore(deps): update shiki monorepo to ^3.8.1 by @renovate[bot] in #2398
- chore(deps): update all patch dependencies by @renovate[bot] in #2396
- Release v2.0.0-beta.22 by @SoonIter in #2407
- chore: remove types reference to fix tsc circular issue by @Timeless0911 in #2408
Full Changelog: v2.0.0-beta.21...v2.0.0-beta.22
v1.45.0
What's Changed
New Features 🎉
- feat: support
file://
protocol andURL
for icon by @JounQin in #2170 - feat!: expose type
RspressPlugin
from "rspress/core", "@rspress/shared" which is a private package should not be installed by users by @SoonIter in #2384
Bug Fixes 🐞
- fix(core/mdx-loader): due to frontmatter stack error loc and remove useless hmr old codes (#2168) by @JounQin in #2171
- fix(plugin-preview): fixed-per-comp "internal" prop should work by @SoonIter in #2181
Document 📖
- docs(plugin-shiki): update package.json description by @SoonIter in #2183
- docs: incorrect usage of
socialLinks
(#2192) by @JounQin in #2198 - docs: use escape character to bypass HTML render by @fi3ework in #2237
Other Changes
- chore(theme): export type
CodeProps
to usegetCustomMDXComponent()
by @JounQin in #2166 - Release v1.45.0 by @SoonIter in #2385
Full Changelog: v1.44.0...v1.45.0
v2.0.0-beta.21
Breaking Changes 🚨
🔥Remove builderPlugins
, migrate to builderConfig.plugins
related PR: #2371
We can already configure Rsbuild in builderConfig
, there is another configuration that is confusing.
Migration step:
export default defineConfig({
- builderPlugins: [
- pluginFoo()
- ],
+ builderConfig: {
+ plugins: [
+ pluginFoo()
+ ],
+ },
});
Expose type RspressPlugin
from "rspress/core"
packge
Related PR: #2360
We do not want users to use our private package like @rspress/shared
, only "rspress": "2.0.0"
package is all your needed
before
import type { RspressPlugin } from '@rspress/shared';
// package.json
{
"devDependencies": {
"rspress": "1.44.0",
"@rspress/shared": "1.44.0"
}
}
after
import type { RspressPlugin } from 'rspress/core';
// package.json
{
"devDependencies": {
"rspress": "2.0.0",
}
}
For compatibility, @rspress/shared
will still export RspressPlugin
type, but using rspress/core
and setting "rspress"
as peerDependencies will make it less likely for your plugin to encounter type errors.
For example:
{
"peerDependencies": {
"rspress": "^2.0.0"
}
}
FIle code block syntax support in core ```tsx file="./demo.tsx"
related PR: #2361
Users can import an external demo file as a code block.
As we support this feature in the core. This also means that the syntax external code blocks are used in plugin-preview
and plugin-playground
will change.
before
only using together with @rspress/plugin-preview
and @rspress/plugin-playground
<code src="./example.tsx" />
after
This syntax is supported in the core package.
```tsx file="./example.tsx"
```
// example.tsx
export default () => <div>I'm a example in another file</div>
What's Changed
New Features 🎉
- feat: change
pnpm install packageName
topnpm add packageName
on PackageManagerTabs by @Marukome0743 in #2364 - feat(mdx)!: support File Code Block of ```tsx file="./filename" to write demo code in another file by @SoonIter in #2361
- feat!: expose type
RspressPlugin
from "rspress/core", "@rspress/shared" which is a private package should not be installed by users by @SoonIter in #2360 - feat(auto-nav-sidebar): support custom-link group by @SoonIter in #2379
Bug Fixes 🐞
- fix: support mutations from child nodes for dynamic TOC by @JounQin in #2363
- fix: use
withBase
from runtime by @jbroma in #2373 - fix(buildCache): other configuration files besides
rspress.config.ts
should be added to persistent cache deps by @SoonIter in #2378 - fix: use SvgWrapper in LinkCard & NavScreenMenuGroup by @jbroma in #2381
Document 📖
- docs: update copyright year to match format by @Marukome0743 in #2362
- docs: update PackageManagerTabs tips for pnpm by @Marukome0743 in #2365
Other Changes
- refactor!: move @rspress/plugin-last-updated and @rspress/plugin-medium-zoom to @rspress/core by @SoonIter in #2359
- test: remove leftover
node:path
module from e2e tests by @Marukome0743 in #2369 - refactor: remove remoteSerach in
search
configuration,type: 'remote'
by @SoonIter in #2366 - test: add missing non-null assertion to dynamic-toc test by @Marukome0743 in #2370
- chore(deps): update all patch dependencies by @renovate[bot] in #2374
- chore(deps): update pnpm to v10.13.1 by @renovate[bot] in #2377
- chore(deps): update dependency zx to ^8.7.0 by @renovate[bot] in #2375
- refactor!: remove
builderPlugins
and migrate it tobuilderConfig.plugins
by @SoonIter in #2371 - chore(deps): update playwright monorepo to v1.54.1 by @renovate[bot] in #2376
- Release v2.0.0-beta.21 by @SoonIter in #2380
New Contributors
- @Marukome0743 made their first contribution in #2362
Full Changelog: v2.0.0-beta.20...v2.0.0-beta.21
v2.0.0-beta.20
Breaking Changes 🚨
Enable performance.buildCache: true
by default ⚡️
related PR: #2349
enable persistent cache by default, ref: https://rspack.rs/config/experiments#persistent-cache
This means that Rspress's local startup speed will be faster .
1. rspress dev
cold start 1s↓
hot start 0.3s↑

2. rspress build
cold build 6.48s↓
hot build 3.18s↑


What's Changed
New Features 🎉
Bug Fixes 🐞
Other Changes
- chore(deps): update all patch dependencies by @renovate in #2352
- chore(deps): update dependency @babel/types to ^7.28.0 by @renovate in #2353
- chore(deps): update dependency @rsbuild/plugin-vue to ^1.1.0 by @renovate in #2354
- chore(deps): update playwright monorepo to v1.53.2 by @renovate in #2355
- Release v2.0.0-beta.20 by @SoonIter in #2358
New Contributors
Full Changelog: v2.0.0-beta.19...v2.0.0-beta.20
v2.0.0-beta.19
Breaking Changes 🚨
Correct relative link in markdown without ./
prefix
Related PR: #2348
Markdown links without "./" prefix are now relative links, e.g: [subfolder](subfolder)
is equal to [subfolder](./subfolder)

Before
[](installation)
and [](installation.mdx)
points to /installation.html
, this behavior is strange ❌
After
[](installation)
and [](installation.mdx)
points to /guide/api/installation.html
✅
If you are updating to Rspress V2, don't worry, our friend markdown.checkDeadLinks
which is also refactored can help us check and find these broken links 👬🏻

What's Changed
New Features 🎉
- feat(theme-default): support binary execution commands in
PackageManagerTabs
component by @artus9033 in #2343 - feat(plugin-llms): multiple configuration for multiple llms.txt by @SoonIter in #2347
Bug Fixes 🐞
- fix(theme/dynamic-toc): remove comment for props replacing in SSG by @SoonIter in #2345
- fix(remarkNormalizeLink)!: support relative path subfolder which is equal to subfolder by @SoonIter in #2348
Document 📖
- docs: add deepwiki badge by @Timeless0911 in #2342
Other Changes
- refactor: move the RoutePath logic to RoutePage class by @SoonIter in #2334
- chore(deps): update all patch dependencies by @renovate in #2337
- chore(deps): update dependency rspress-plugin-sitemap to ^1.2.0 by @renovate in #2339
- chore(deps): update dependency zx to ^8.6.0 by @renovate in #2340
- refactor: move remark-check-deadlink to remark-normalize-link and fix plugin-llms with base usage by @SoonIter in #2335
- test(e2e): add dir link to check-dead-link by @SoonIter in #2344
- chore(cli): polish checkDeadLinks logs by @SoonIter in #2350
- Release v2.0.0-beta.19 by @SoonIter in #2351
New Contributors
- @artus9033 made their first contribution in #2343
Full Changelog: v2.0.0-beta.18...v2.0.0-beta.19
v2.0.0-beta.18
Breaking Changes 🚨
Reimplement base
config with basename
feature of react-router
Related PR: #2322
If you are using const { pathname } = useLocation()
together with base
configuration, it should be noted that pathname will not contain base
url, as the top-level BrowserRouter includes basename
What's Changed
Bug Fixes 🐞
- fix: should add nav-json-schema.json and expose
rspress/shiki-transformers
by @SoonIter in #2327 - fix: sidebarGroup should add
SidebarSectionHeader
by @SoonIter in #2328 - fix(ssg): better format of mdx compile time error in SSG by @SoonIter in #2332
Other Changes
- chore(deps): upgrade @rslib/[email protected] by @SoonIter in #2323
- refactor(runtime)!: use
basename
feature of react-router by @SoonIter in #2322 - chore!: remove builtin
@rspress/plugin-container-syntax
pkg and intergrateremarkContainerSyntax
to @rspress/core by @SoonIter in #2324 - chore(deps): upgrade to [email protected] by @SoonIter in #2330
- chore: add pnpm setting to pnpm-workspace by @kovsu in #2331
- Release v2.0.0-beta.18 by @SoonIter in #2326
New Contributors
Full Changelog: v2.0.0-beta.17...v2.0.0-beta.18
v2.0.0-beta.17
Breaking Changes 🚨
Support Single Nav Mode by renaming the top level _meta.json
to _nav.json
Related PR: #2314
If your top level does not have _nav.json, themeConfig.nav
will not be generated, and your homepage will directly enter the document.
For example:
├── doc
│ ├── guide
│ │ ├── advanced
│ │ │ └── plugin.mdx
│ │ ├── _meta.json
│ │ └── index.mdx
+ ├── _meta.json
│ └── index.md
├── package.json
└── rspress.config.ts

What's Changed
New Features 🎉
- feat(auto-nav-sidebar)!: rename the top level
_meta.json
to_nav.json
in order to support single Nav Mode by @SoonIter in #2314
Performance 🚀
Bug Fixes 🐞
- fix: auto-nav-sidebar should respect locales config by @SoonIter in #2307
- fix(rehypeHeaderAnchor): trim anchor for better format with React Component by @SoonIter in #2318
- fix(publicDir): should work with
base
inrspress dev
andrspress preview
by @SoonIter in #2317
Document 📖
- docs: fix Rsbuild url in README.md by @superpung in #2304
Other Changes
- refactor(auto-nav): rewrite the logic, refine the code style by @SoonIter in #2303
- chore(deps): upgrade [email protected] by @SoonIter in #2305
- chore(infra)!: move "@rspress/plugin-auto-nav-sidebar" to @rspress/core by @SoonIter in #2306
- chore(deps): update dependency create-rstack to v1.5.1 by @renovate in #2310
- chore(deps): update all patch dependencies by @renovate in #2309
- chore(deps): update dependency react-docgen-typescript to v2.4.0 by @renovate in #2312
- chore(deps): update dependency prettier to v3.6.0 by @renovate in #2311
- chore(deps): update @rsbuild/core to 1.4.0-rc.0 by @chenjiahan in #2315
- Release v2.0.0-beta.17 by @SoonIter in #2320
New Contributors
- @superpung made their first contribution in #2304
Full Changelog: v2.0.0-beta.16...v2.0.0-beta.17
v2.0.0-beta.16
What's Changed
Bug Fixes 🐞
Other Changes
- refactor(ssg): use
async-node
target with asyncChunks by @SoonIter in #2294 - chore(ssg): rename ssg folder to "ssg" by @SoonIter in #2295
- test(auto-nav): add same-name dir with file case in auto-nav snap by @SoonIter in #2300
- Release v2.0.0-beta.16 by @SoonIter in #2301
Full Changelog: v2.0.0-beta.15...v2.0.0-beta.16
v2.0.0-beta.15
What's Changed
Bug Fixes 🐞
Other Changes
- refactor(virtual-module): migrate rspress plugin.addRuntimeModules to rsbuild-plugin-virtual-module by @SoonIter in #2273
- chore(deps): update all patch dependencies by @renovate in #2277
- chore(deps): update dependency lint-staged to ~15.5.2 by @renovate in #2282
- chore(deps): update dependency nx to v20.8.2 by @renovate in #2283
- chore(deps): remove unused dependency
framer-motion
by @Timeless0911 in #2285 - chore(deps): update dependency path-serializer to v0.5.0 by @renovate in #2284
- test: move custom-id to unit test instead of e2e test by @SoonIter in #2287
- chore(deps): update dependency @rslib/core to v0.10.0 by @renovate in #2288
- refactor: frontmatter.head should be rendered by @unhead/react by @SoonIter in #2289
- refactor!: remove useless "id" field in
PageIndexInfo
by @SoonIter in #2291 - test: add getPageIndexInfoByRoute unit test by @SoonIter in #2292
- Release v2.0.0-beta.15 by @SoonIter in #2293
Full Changelog: v2.0.0-beta.14...v2.0.0-beta.15
v2.0.0-beta.14
Breaking Changes 🚨
Remove @rspress/plugin-shiki
package and create rspress/shiki-transformers
🔥
related PR: #2270
We have already enabled shiki by default, so this package is no longer maintained.
If you want to use some built-in transformers of Rspress, you can do this below:
import { transformerCompatibleMetaHighlight } from "rspress/shiki-transformers";
It also supports using it in React components,
For example:
import { CodeBlockRuntime } from '@theme';
import { transformerNotationHighlight } from '@shikijs/transformers';
import { transformerLineNumber } from "rspress/shiki-transformers";
<CodeBlockRuntime
lang="ts"
title="highlight.ts"
code={`console.log('Highlighted'); // [!code highlight]
// [!code highlight:1]
console.log('Highlighted');
console.log('Not highlighted');`}
shikiOptions={{
transformers: [transformerNotationHighlight(), transformerLineNumber()],
}}
/>
What's Changed
New Features 🎉
Bug Fixes 🐞
Other Changes
- chore(renovate): allow to bump pnpm version automatically by @Timeless0911 in #2264
- chore: remove the useless highlightLanguages option by @SoonIter in #2265
- test(mdx): migrate the test case to unit test by @SoonIter in #2269
- refactor(plugin-shiki)!: remove @rspress/plugin-shiki, create "@rspress/core/shiki-transformers" by @SoonIter in #2270
- Release v2.0.0-beta.14 by @SoonIter in #2271
New Contributors
Full Changelog: v2.0.0-beta.13...v2.0.0-beta.14