Skip to content

docs: add tsc migration guide#1503

Merged
Timeless0911 merged 1 commit intomainfrom
vk/876d-tsc-rslib
Mar 2, 2026
Merged

docs: add tsc migration guide#1503
Timeless0911 merged 1 commit intomainfrom
vk/876d-tsc-rslib

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Mar 2, 2026

This PR introduces a comprehensive guide for migrating projects using tsc (TypeScript Compiler) to Rslib.

What changes were made

  • Added a new tsc.mdx migration guide in both English (website/docs/en/guide/migration/tsc.mdx) and Chinese (website/docs/zh/guide/migration/tsc.mdx).
  • Updated the migration sidebar configuration (_meta.json) in both languages to feature tsc at the top of the list.

Why they were made

To provide clear, step-by-step instructions for users transitioning their build process from tsc to Rslib. Since tsc naturally corresponds to Rslib's bundleless mode, this guide helps users maintain their file structure and output behavior seamlessly while leveraging Rslib.

Implementation details

  • Dependencies & npm scripts: Instructions on adopting @rslib/core and replacing build commands.
  • Configuration mapping: A direct mapping of common tsc compilerOptions (like declaration, declarationDir, outDir, module, target) to Rslib configurations.
  • CLI parameters: Detailed guides on handling custom tsconfig files (tsc -p) and TypeScript Project References (tsc -b).
  • JSX handling: Extensive examples of dealing with JSX, covering both transforming it (via @rsbuild/plugin-react with target: 'web') and preserving it (runtime: 'preserve').
  • Verification steps: Actionable advice on ensuring the migrated artifacts mirror the previous directory structure, file extensions, and entry fields.

This PR was written using Vibe Kanban

Copilot AI review requested due to automatic review settings March 2, 2026 06:59
@Timeless0911 Timeless0911 changed the title 写一篇 tsc 项目迁移到 rslib 的文档 (vibe-kanban) docs: add tsc migration guide (Vibe Kanban) Mar 2, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 2, 2026

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87bb359
Status: ✅  Deploy successful!
Preview URL: https://d4fe463d.rslib.pages.dev
Branch Preview URL: https://vk-876d-tsc-rslib.rslib.pages.dev

View logs

@Timeless0911 Timeless0911 changed the title docs: add tsc migration guide (Vibe Kanban) docs: add tsc migration guide Mar 2, 2026
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

为文档站新增「tsc 项目迁移到 Rslib」的中英文迁移指南,并更新 migration 侧边栏元数据以纳入新页面,同时对 tsup 迁移文档的尾部说明做了小幅措辞调整。

Changes:

  • 新增 tsc -> Rslib 迁移指南(中英文),覆盖依赖、scripts、配置项/CLI 选项映射、JSX 场景与验证步骤。
  • 更新中英文 migration _meta.json,将 tsc 页面加入导航并调整顺序。
  • 微调 tsup 迁移文档尾部引用块文案(中文)。

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/docs/zh/guide/migration/tsup.mdx 更新尾部引用块文案表述
website/docs/zh/guide/migration/tsc.mdx 新增中文 tsc 迁移指南
website/docs/zh/guide/migration/_meta.json 将 tsc 加入中文迁移导航并调整顺序
website/docs/en/guide/migration/tsc.mdx 新增英文 tsc 迁移指南
website/docs/en/guide/migration/_meta.json 将 tsc 加入英文迁移导航并调整顺序

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

Timeless0911 added a commit that referenced this pull request Mar 2, 2026
**新的 PR 标题:**
`docs: add tsc migration guide (Vibe Kanban)`

**新的 PR 描述:**
包含了对 `tsc` 迁移到 Rslib 的详尽分析,清晰阐明了我们在迁移指南中增加的内容(比如 bundleless 模式、CLI 参数和 JSX 的特殊处理等),并在末尾附上了 Vibe Kanban 的说明链接。

你可以在这里查看更新后的 PR:#1503
@Timeless0911 Timeless0911 enabled auto-merge (squash) March 2, 2026 07:58
@Timeless0911 Timeless0911 merged commit 292d916 into main Mar 2, 2026
12 checks passed
@Timeless0911 Timeless0911 deleted the vk/876d-tsc-rslib branch March 2, 2026 07:59
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