github web-infra-dev/rspress v2.0.0-alpha.0

latest release: v1.43.1
pre-release2 days ago

What's Changed

Breaking Changes 🚨

  • Use named export instead of default export in customizing theme (#1873)

    If you want to customize theme, please use named export as below:

    before

    Layout HomeLayout setup DocLayout use default export,

    other components use named export

     import Theme from 'rspress/theme';
     
     const Layout = () => <Theme.Layout beforeNavTitle={<div>some content</div>} />;
     
     export default {
       ...Theme,
       Layout,
     };
     
     export * from 'rspress/theme';

    after

    all the components use named export

     import { Layout as BasicLayout } from 'rspress/theme';
     
     const Layout = () => <BasicLayout beforeNavTitle={<div>some content</div>} />;
     
     // use named export, no need to `export default`
     export { Layout };
     
     export * from 'rspress/theme';

New Features 🎉

  • feat(nav): improve dropdown menu interaction by @chenjiahan in #1910
  • feat(theme)!: use named export instead of default export, for circular imports by @SoonIter in #1873

Performance 🚀

  • perf(search): add index async to avoid blocking the main thread by @chenjiahan in #1892
  • perf(search): remove group calculation by @chenjiahan in #1893
  • perf: use matchPath rather than matchRoutes, remove unused group.title by @SoonIter in #1895
  • perf(search): improve initialization and prefetching logic by @chenjiahan in #1899

Bug Fixes 🐞

Document 📖

Other Changes

New Contributors

Full Changelog: v1.43.0...v2.0.0-alpha.0

Don't miss a new rspress release

NewReleases is sending notifications on new releases.