Skip to content

chore: enable tsgo for dts generation#13952

Merged
chenjiahan merged 5 commits into
mainfrom
chenjiahan/feat-enable-tsgo-dts
May 9, 2026
Merged

chore: enable tsgo for dts generation#13952
chenjiahan merged 5 commits into
mainfrom
chenjiahan/feat-enable-tsgo-dts

Conversation

@chenjiahan

@chenjiahan chenjiahan commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Enable Rslib's dts.tsgo for Rspack declaration generation and add @typescript/native-preview so pnpm build:js can use the native TypeScript preview backend.
  • Use Rslib to build @rspack/test-tools.

Performance for pnpm build:js:

  • before: 13.63s user 2.30s system 290% cpu 5.488 total
  • after: 6.22s user 2.02s system 306% cpu 2.693 total

Related links

https://rslib.rs/config/lib/dts#dtstsgo

Checklist

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

Copilot AI review requested due to automatic review settings May 8, 2026 08:42
@chenjiahan chenjiahan requested a review from hardfist as a code owner May 8, 2026 08:42
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 3ace5ce to test: configure rayon for codspeed benchmarks (#13954) by hardfist

❌ Size increased by 4.00KB from 61.92MB to 61.92MB (⬆️0.01%)

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 6 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB 0
react-10k 5.7 MB 0
react-1k 826.3 KB 0
react-5k 2.7 MB 0
rome 1.6 MB 0
ui-components 4.8 MB 0

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 34 untouched benchmarks


Comparing chenjiahan/feat-enable-tsgo-dts (3ace5ce) with main (8e9a318)

Open in CodSpeed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enables Rslib’s dts.tsgo backend for faster TypeScript declaration (.d.ts) generation in the Rspack packages, and adds @typescript/native-preview so the native TypeScript preview backend is available during pnpm build:js.

Changes:

  • Add @typescript/native-preview as a root devDependency (and update the lockfile accordingly).
  • Enable dts.tsgo: true in the Rslib configs for @rspack/core, @rspack/browser, and @rspack/cli.

Reviewed changes

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

Show a summary per file
File Description
package.json Adds @typescript/native-preview to support the native TS preview backend for dts generation.
pnpm-lock.yaml Locks @typescript/native-preview and its platform packages; wires it into the resolved @rslib/core / rsbuild-plugin-dts peer set.
packages/rspack/rslib.config.ts Enables dts.tsgo for core Rspack declaration generation.
packages/rspack/rslib.browser.config.ts Enables dts.tsgo for the browser build declaration generation.
packages/rspack-cli/rslib.config.ts Enables dts.tsgo for CLI bundled declaration output.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@chenjiahan chenjiahan requested a review from LingyuCoder as a code owner May 8, 2026 09:16
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 9, 2026

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ace5ce
Status: ✅  Deploy successful!
Preview URL: https://5d4c609c.rspack-v2.pages.dev
Branch Preview URL: https://chenjiahan-feat-enable-tsgo.rspack-v2.pages.dev

View logs

@chenjiahan chenjiahan enabled auto-merge (squash) May 9, 2026 03:11
@chenjiahan chenjiahan merged commit ed2742a into main May 9, 2026
35 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/feat-enable-tsgo-dts branch May 9, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants