Skip to content

v2.0.0-beta.22

Pre-release
Pre-release
Compare
Choose a tag to compare
@SoonIter SoonIter released this 23 Jul 03:29
· 183 commits to main since this release
dbc02df

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.

image

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 πŸŽ‰

  • feat(ssg): add ssg.experimentalExcludeRoutePaths by @SoonIter in #2405

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 and collapsed 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

Full Changelog: v2.0.0-beta.21...v2.0.0-beta.22