From 7d56e5075a057fbac4e214b1a9fa6fcfb01f4371 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Sat, 20 Sep 2025 03:04:10 +0800 Subject: [PATCH] update --- docs/plugin-transform-react-jsx-self.md | 4 ---- docs/plugin-transform-react-jsx-source.md | 4 ---- docs/preset-react.md | 9 +-------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/plugin-transform-react-jsx-self.md b/docs/plugin-transform-react-jsx-self.md index 804bedd08f..e029a3db7a 100644 --- a/docs/plugin-transform-react-jsx-self.md +++ b/docs/plugin-transform-react-jsx-self.md @@ -4,10 +4,6 @@ title: "@babel/plugin-transform-react-jsx-self" sidebar_label: react-jsx-self --- -:::info -This plugin is included in `@babel/preset-react` -::: - ## Example **In** diff --git a/docs/plugin-transform-react-jsx-source.md b/docs/plugin-transform-react-jsx-source.md index 3d3eb853ea..304f4bfb53 100644 --- a/docs/plugin-transform-react-jsx-source.md +++ b/docs/plugin-transform-react-jsx-source.md @@ -4,10 +4,6 @@ title: "@babel/plugin-transform-react-jsx-source" sidebar_label: react-jsx-source --- -:::info -This plugin is included in `@babel/preset-react` -::: - ## Example **In** diff --git a/docs/preset-react.md b/docs/preset-react.md index 5905fdb30b..e9dc60638a 100644 --- a/docs/preset-react.md +++ b/docs/preset-react.md @@ -3,19 +3,12 @@ id: babel-preset-react title: "@babel/preset-react" --- -This preset always includes the following plugins: +This preset includes the following plugins: - [@babel/plugin-syntax-jsx](plugin-syntax-jsx.md) - [@babel/plugin-transform-react-jsx](plugin-transform-react-jsx.md) - [@babel/plugin-transform-react-display-name](plugin-transform-react-display-name.md) -And with the `development` option: - -Classic runtime adds: - -- [@babel/plugin-transform-react-jsx-self](plugin-transform-react-jsx-self.md) -- [@babel/plugin-transform-react-jsx-source](plugin-transform-react-jsx-source.md) - Automatic runtime (since `v7.9.0`) adds the functionality for these plugins automatically when the `development` option is enabled. If you have automatic runtime enabled, adding [@babel/plugin-transform-react-jsx-self](plugin-transform-react-jsx-self.md) or [@babel/plugin-transform-react-jsx-source](plugin-transform-react-jsx-source.md) will error. > Note: Flow syntax support is no longer enabled in v7. For that, you will need to add the [Flow preset](preset-flow.md).