Skip to content

docs(plugin-preview): add migration note for removed Less/Sass built-in plugins and OverviewGroup usage#3197

Merged
SoonIter merged 6 commits intomainfrom
syt-vibe-kanban/2b18-plugin-preview
Mar 6, 2026
Merged

docs(plugin-preview): add migration note for removed Less/Sass built-in plugins and OverviewGroup usage#3197
SoonIter merged 6 commits intomainfrom
syt-vibe-kanban/2b18-plugin-preview

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Mar 5, 2026

Summary

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

AI Summary

What changed

Updated migration documentation for @rspress/plugin-preview across 4 files (EN/ZH):

  • plugin-preview docs (preview.mdx): Added a migration note in the "Migrating from V1" section explaining that @rsbuild/plugin-less and @rsbuild/plugin-sass are no longer built-in, with a code example showing how to configure them via iframeOptions.builderConfig.
  • Main migration guide (rspress-1-x.mdx): Added a new plugin-preview section documenting the same breaking change, with a link to the full plugin-preview migration guide.

Why

In @rspress/plugin-preview V2, the built-in @rsbuild/plugin-less and @rsbuild/plugin-sass dependencies were removed to reduce bundle size and avoid unnecessary dependencies for users who don't need Less/Sass. Users who rely on these preprocessors in their previews need clear guidance on how to manually configure them.

Details

Users can restore Less/Sass support by adding the corresponding Rsbuild plugin through iframeOptions.builderConfig.plugins:

import { pluginLess } from '@rsbuild/plugin-less';

pluginPreview({
  iframeOptions: {
    builderConfig: {
      plugins: [pluginLess()],
    },
  },
});

This PR was written using Vibe Kanban


…in plugins

In plugin-preview V2, @rsbuild/plugin-less and @rsbuild/plugin-sass are
no longer built-in. Document how to configure them manually via
iframeOptions.builderConfig.
Copilot AI review requested due to automatic review settings March 5, 2026 06:42
@SoonIter SoonIter changed the title 文档补充一下 plugin-preview 迁移指南 (vibe-kanban) docs(plugin-preview): add migration note for removed Less/Sass built-in plugins Mar 5, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 5, 2026

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 544b178
Status: ✅  Deploy successful!
Preview URL: https://2a79244d.rspress-v2.pages.dev
Branch Preview URL: https://syt-vibe-kanban-2b18-plugin.rspress-v2.pages.dev

View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
node 12.2 MB 📈 +156.4 KB (+1.3%)
node_md 1.5 MB +12.7 KB (0.8%)
web 16.1 MB +43.0 KB (0.3%)
📋 Detailed Reports (Click to expand)

📁 node

Path: website/doc_build/diff-rsdoctor/node/rsdoctor-data.json

📌 Baseline Commit: b124bc2da6 | PR: #3199

Metric Current Baseline Change
📊 Total Size 12.2 MB 12.1 MB +156.4 KB (+1.3%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 12.2 MB 12.1 MB +156.4 KB (+1.3%)
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: node Bundle Diff

📁 node_md

Path: website/doc_build/diff-rsdoctor/node_md/rsdoctor-data.json

📌 Baseline Commit: b124bc2da6 | PR: #3199

Metric Current Baseline Change
📊 Total Size 1.5 MB 1.5 MB +12.7 KB (0.8%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 1.5 MB 1.5 MB +12.7 KB (0.8%)

📦 Download Diff Report: node_md Bundle Diff

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: b124bc2da6 | PR: #3199

Metric Current Baseline Change
📊 Total Size 16.1 MB 16.0 MB +43.0 KB (0.3%)
📄 JavaScript 15.8 MB 15.8 MB +42.3 KB (0.3%)
🎨 CSS 120.3 KB 120.3 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 164.4 KB 163.8 KB +650.0 B (0.4%)

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

补充了 @rspress/plugin-preview 从 V1 迁移到 V2 的说明,明确 V2 不再内置 @rsbuild/plugin-less / @rsbuild/plugin-sass,并引导用户通过 iframeOptions.builderConfig 手动为预览 iframe 的 Rsbuild 实例添加对应插件。

Changes:

  • 在 plugin-preview 的中英文迁移章节新增 “Less/Sass 需手动通过 iframeOptions.builderConfig 配置” 说明与示例
  • 在 Rspress 1.x -> 2.x 的中英文迁移指南新增 plugin-preview 小节,并链接到 plugin-preview 迁移文档

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
website/docs/zh/plugin/official-plugins/preview.mdx 在中文 plugin-preview 迁移章节补充 Less/Sass 插件不再内置及配置方式示例
website/docs/zh/guide/migration/rspress-1-x.mdx 在中文总迁移指南新增 plugin-preview 小节并给出配置示例与跳转链接
website/docs/en/plugin/official-plugins/preview.mdx 在英文 plugin-preview 迁移章节补充 Less/Sass 插件不再内置及配置方式示例
website/docs/en/guide/migration/rspress-1-x.mdx 在英文总迁移指南新增 plugin-preview 小节并给出配置示例与跳转链接

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/docs/en/guide/migration/rspress-1-x.mdx Outdated
Comment thread website/docs/zh/plugin/official-plugins/preview.mdx
Comment thread website/docs/en/plugin/official-plugins/preview.mdx Outdated
Comment thread website/docs/zh/guide/migration/rspress-1-x.mdx Outdated
Comment thread website/docs/zh/guide/migration/rspress-1-x.mdx Outdated
Comment thread website/docs/en/guide/migration/rspress-1-x.mdx
Comment thread website/docs/zh/guide/migration/rspress-1-x.mdx Outdated
SoonIter added 4 commits March 6, 2026 14:35
… and install steps

Address review feedback: add missing pluginPreview/defineConfig imports,
show full rspress.config.ts context, and add PackageManagerTabs install
instructions for @rsbuild/plugin-less and @rsbuild/plugin-sass.
The Chinese overview-page doc was missing the OverviewGroup usage
example that existed in the English version's Customization section.
Provide two customization approaches:
1. Custom theme to modify OverviewGroup styles while keeping built-in
   overview functionality
2. Fully custom page content using OverviewGroup with pageType: doc-wide
@SoonIter SoonIter changed the title docs(plugin-preview): add migration note for removed Less/Sass built-in plugins docs(plugin-preview): add migration note for removed Less/Sass built-in plugins and OverviewGroup usage Mar 6, 2026
@SoonIter SoonIter enabled auto-merge (squash) March 6, 2026 07:39
@SoonIter SoonIter requested a review from Timeless0911 March 6, 2026 07:56
@SoonIter SoonIter merged commit 4e73f91 into main Mar 6, 2026
5 checks passed
@SoonIter SoonIter deleted the syt-vibe-kanban/2b18-plugin-preview branch March 6, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants