Skip to content

docs: update SWC React options type#5279

Merged
chenjiahan merged 1 commit intomainfrom
react_type_0520
May 20, 2025
Merged

docs: update SWC React options type#5279
chenjiahan merged 1 commit intomainfrom
react_type_0520

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Update SWC React options type to match the latest implementation.

Ref: https://github.com/swc-project/swc/blob/883b24c6248fecb223693974951080889bd8827a/packages/types/index.ts#L878-L949

Removed the deprecated useBuiltins option, see web-infra-dev/rspack#10410

Checklist

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

Copilot AI review requested due to automatic review settings May 20, 2025 05:18
@netlify
Copy link
Copy Markdown

netlify Bot commented May 20, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit effb4cd
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/682c10acbda7e800082c5dd3
😎 Deploy Preview https://deploy-preview-5279--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 60 (🔴 down 15 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR updates the React plugin documentation to align with the latest SWC options type, removing a deprecated field and expanding the refresh option syntax.

  • Renamed the interface from SwcReactOptions to ReactConfig.
  • Removed the deprecated useBuiltins option.
  • Expanded refresh to accept either a boolean or an object with refreshReg, refreshSig, and emitFullSignatures.

Reviewed Changes

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

File Description
website/docs/zh/plugins/list/plugin-react.mdx Renamed interface, removed useBuiltins, updated refresh type in Chinese docs
website/docs/en/plugins/list/plugin-react.mdx Renamed interface, removed useBuiltins, updated refresh type in English docs
Comments suppressed due to low confidence (2)

website/docs/zh/plugins/list/plugin-react.mdx:42

  • [nitpick] The interface name ReactConfig may be too generic; consider a more specific name like SwcReactConfig or add a clarifying comment to prevent confusion with other React configs.
interface ReactConfig {

website/docs/en/plugins/list/plugin-react.mdx:42

  • [nitpick] The interface name ReactConfig may be too generic; consider a more descriptive name like SwcReactConfig or add a note explaining its context.
interface ReactConfig {

Comment thread website/docs/zh/plugins/list/plugin-react.mdx
Comment thread website/docs/en/plugins/list/plugin-react.mdx
@chenjiahan chenjiahan merged commit bbab73c into main May 20, 2025
12 checks passed
@chenjiahan chenjiahan deleted the react_type_0520 branch May 20, 2025 05:22
@chenjiahan chenjiahan mentioned this pull request May 20, 2025
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.

2 participants