Skip to content

Commit 0a8bb1a

Browse files
chore(deps): update dependency @vitejs/plugin-react to v4 (#4520)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme) ([source](https://github.com/vitejs/vite-plugin-react)) | [`^3.1.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-react/3.1.0/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/compatibility-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/confidence-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vitejs/vite-plugin-react</summary> ### [`v4.0.0`](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#&#8203;400-2023-04-20) [Compare Source](https://github.com/vitejs/vite-plugin-react/compare/cda8145b8dc5a7211c0e3f8a253b4cac9c2c3d42...f87d23e91fa48b8a8488dd8bee5277070f5fc3c2) This major version include a revamp of options: - `include`/`exclude` now allow to completely override the files processed by the plugin ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/122)). This is more in line with other Rollup/Vite plugins and simplify the setup of enabling Fast Refresh for `.mdx` files. This can be done like this: ```js export default defineConfig({ plugins: [ { enforce: 'pre', ...mdx() }, react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }), ], }) ``` These changes also allow to apply Babel plugins on files outside Vite root (expect in node_modules), which improve support for monorepo (fix [#&#8203;16](https://github.com/vitejs/vite-plugin-react/issues/16)). With these changes, only the file extensions is used for filtering processed files and the query param fallback is removed. - `fastRefresh` is removed ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/122)). This should be correctly activated by plugin without configuration. - `jsxPure` is removed. This is a niche use case that was just passing down the boolean to esbuild.jsxSideEffects. ([#&#8203;129](https://github.com/vitejs/vite-plugin-react/pull/129)) The support for React auto import whe using classic runtime is removed. This was prone to errors and added complexity for no good reason given the very wide support of automatic runtime nowadays. This migration path should be as simple as removing the runtime option from the config. This release goes in hand with the upcoming Vite 4.3 release focusing on performances: - Cache plugin load ([#&#8203;141](https://github.com/vitejs/vite-plugin-react/issues/141)) - Wrap dynamic import to speedup analysis ([#&#8203;143](https://github.com/vitejs/vite-plugin-react/issues/143)) Other notable changes: - Silence "use client" warning ([#&#8203;144](https://github.com/vitejs/vite-plugin-react/pull/144), fix [#&#8203;137](https://github.com/vitejs/vite-plugin-react/issues/137)) - Fast Refresh is applied on JS files using automatic runtime ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/122), fix [#&#8203;83](https://github.com/vitejs/vite-plugin-react/issues/83)) - Vite 4.2 is required as a peer dependency ([#&#8203;128](https://github.com/vitejs/vite-plugin-react/pull/128)) - Avoid key collision in React refresh registration ([a74dfef](https://github.com/vitejs/vite-plugin-react/commit/a74dfef), fix [#&#8203;116](https://github.com/vitejs/vite-plugin-react/issues/116)) - Throw when refresh runtime is loaded twice ([#&#8203;108](https://github.com/vitejs/vite-plugin-react/pull/108), fix [#&#8203;101](https://github.com/vitejs/vite-plugin-react/issues/101)) - Don't force optimization of jsx-runtime ([#&#8203;132](https://github.com/vitejs/vite-plugin-react/pull/132)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/SAP/ui5-webcomponents-react). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41NC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTQuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent b8ea547 commit 0a8bb1a

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@typescript-eslint/eslint-plugin": "^5.54.1",
5959
"@typescript-eslint/parser": "^5.54.1",
6060
"@ui5/webcomponents-tools": "1.12.2",
61-
"@vitejs/plugin-react": "^3.1.0",
61+
"@vitejs/plugin-react": "^4.0.0",
6262
"chromatic": "^6.5.3",
6363
"cypress": "^12.1.0",
6464
"dedent": "^0.7.0",

yarn.lock

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ __metadata:
103103
languageName: node
104104
linkType: hard
105105

106-
"@babel/core@npm:7.21.4":
106+
"@babel/core@npm:7.21.4, @babel/core@npm:^7.21.4":
107107
version: 7.21.4
108108
resolution: "@babel/core@npm:7.21.4"
109109
dependencies:
@@ -1341,6 +1341,17 @@ __metadata:
13411341
languageName: node
13421342
linkType: hard
13431343

1344+
"@babel/plugin-transform-react-jsx-self@npm:^7.21.0":
1345+
version: 7.21.0
1346+
resolution: "@babel/plugin-transform-react-jsx-self@npm:7.21.0"
1347+
dependencies:
1348+
"@babel/helper-plugin-utils": ^7.20.2
1349+
peerDependencies:
1350+
"@babel/core": ^7.0.0-0
1351+
checksum: 696f74c04a265409ccd46e333ff762e6011d394e6972128b5d97db4c1647289141bc7ebd45ab2bab99b60932f9793e8f89ee9432d3bde19962de2100456f6147
1352+
languageName: node
1353+
linkType: hard
1354+
13441355
"@babel/plugin-transform-react-jsx-source@npm:^7.19.6":
13451356
version: 7.19.6
13461357
resolution: "@babel/plugin-transform-react-jsx-source@npm:7.19.6"
@@ -5478,7 +5489,7 @@ __metadata:
54785489
languageName: node
54795490
linkType: hard
54805491

5481-
"@vitejs/plugin-react@npm:^3.0.1, @vitejs/plugin-react@npm:^3.1.0":
5492+
"@vitejs/plugin-react@npm:^3.0.1":
54825493
version: 3.1.0
54835494
resolution: "@vitejs/plugin-react@npm:3.1.0"
54845495
dependencies:
@@ -5493,6 +5504,20 @@ __metadata:
54935504
languageName: node
54945505
linkType: hard
54955506

5507+
"@vitejs/plugin-react@npm:^4.0.0":
5508+
version: 4.0.0
5509+
resolution: "@vitejs/plugin-react@npm:4.0.0"
5510+
dependencies:
5511+
"@babel/core": ^7.21.4
5512+
"@babel/plugin-transform-react-jsx-self": ^7.21.0
5513+
"@babel/plugin-transform-react-jsx-source": ^7.19.6
5514+
react-refresh: ^0.14.0
5515+
peerDependencies:
5516+
vite: ^4.2.0
5517+
checksum: 575298f66517c51348892d49b302490c48e15c9ddb0b2c5f710931804e559dceafca1be1e62cb72d0902cba5f3c98e4b1272970d328e3a62d59ecdf976e68d3d
5518+
languageName: node
5519+
linkType: hard
5520+
54965521
"@wdio/cli@npm:^7.19.7":
54975522
version: 7.30.1
54985523
resolution: "@wdio/cli@npm:7.30.1"
@@ -21403,7 +21428,7 @@ __metadata:
2140321428
"@ui5/webcomponents-fiori": 1.12.2
2140421429
"@ui5/webcomponents-icons": 1.12.2
2140521430
"@ui5/webcomponents-tools": 1.12.2
21406-
"@vitejs/plugin-react": ^3.1.0
21431+
"@vitejs/plugin-react": ^4.0.0
2140721432
chromatic: ^6.5.3
2140821433
cypress: ^12.1.0
2140921434
dedent: ^0.7.0

0 commit comments

Comments
 (0)