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",
}
}Details
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 packageNametopnpm add packageNameon 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
RspressPluginfrom "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
withBasefrom runtime by @jbroma in #2373 - fix(buildCache): other configuration files besides
rspress.config.tsshould 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:pathmodule from e2e tests by @Marukome0743 in #2369 - refactor: remove remoteSerach in
searchconfiguration,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
builderPluginsand migrate it tobuilderConfig.pluginsby @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