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.experimentalWorkerbased on tinypool to speed up ssg process by @SoonIter in #2394
Bug Fixes 🐞
- fix(auto-nav-sidebar): custom link should support
collapsibleandcollapsedlike"type": dirby @SoonIter in #2382 - fix!: remove
rspresspackage,rspress=>@rspress/corerspress/theme=>@rspress/core/themerspress/runtime=>@rspress/core/runtimeby @SoonIter in #2386 - fix(fileCodeBlock): optimize the error message and fix
.length is not definedby @SoonIter in #2387 - fix: use
_nav.jsonin 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
namefield 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