vitejs/vite-plugin-react
### [`v4.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#400-2023-04-20)
[Compare Source](https://togithub.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 ([#122](https://togithub.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 [#16](https://togithub.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 ([#122](https://togithub.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. ([#129](https://togithub.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 ([#141](https://togithub.com/vitejs/vite-plugin-react/issues/141))
- Wrap dynamic import to speedup analysis ([#143](https://togithub.com/vitejs/vite-plugin-react/issues/143))
Other notable changes:
- Silence "use client" warning ([#144](https://togithub.com/vitejs/vite-plugin-react/pull/144), fix [#137](https://togithub.com/vitejs/vite-plugin-react/issues/137))
- Fast Refresh is applied on JS files using automatic runtime ([#122](https://togithub.com/vitejs/vite-plugin-react/pull/122), fix [#83](https://togithub.com/vitejs/vite-plugin-react/issues/83))
- Vite 4.2 is required as a peer dependency ([#128](https://togithub.com/vitejs/vite-plugin-react/pull/128))
- Avoid key collision in React refresh registration ([a74dfef](https://togithub.com/vitejs/vite-plugin-react/commit/a74dfef), fix [#116](https://togithub.com/vitejs/vite-plugin-react/issues/116))
- Throw when refresh runtime is loaded twice ([#108](https://togithub.com/vitejs/vite-plugin-react/pull/108), fix [#101](https://togithub.com/vitejs/vite-plugin-react/issues/101))
- Don't force optimization of jsx-runtime ([#132](https://togithub.com/vitejs/vite-plugin-react/pull/132))
### [`v3.1.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#310-2023-02-02)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/d758a2a44b0a2cb3c206fa61166cda9d5cf58221...cda8145b8dc5a7211c0e3f8a253b4cac9c2c3d42)
- doc: add jsxImportSource option ([38d71f6](https://togithub.com/vitejs/vite-plugin-react/commit/38d71f6))
- chore: bump release-scripts, typecheck package in CI, remove cache for eslint ([9af763d](https://togithub.com/vitejs/vite-plugin-react/commit/9af763d))
- fix: fast-refresh explain link ([#97](https://togithub.com/vitejs/vite-plugin-react/issues/97)) ([6097795](https://togithub.com/vitejs/vite-plugin-react/commit/6097795)), closes [#97](https://togithub.com/vitejs/vite-plugin-react/issues/97)
### [`v3.0.1`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#small301-2023-01-05-small)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/0aaf2e56de64d566af9636877200029ec6437918...d758a2a44b0a2cb3c206fa61166cda9d5cf58221)
- fix: don't invalidate when code is invalid ([#67](https://togithub.com/vitejs/vite-plugin-react/issues/67)) ([9231a86](https://togithub.com/vitejs/vite-plugin-react/commit/9231a86)), closes [#67](https://togithub.com/vitejs/vite-plugin-react/issues/67)
- fix(deps): update all non-major dependencies ([#69](https://togithub.com/vitejs/vite-plugin-react/issues/69)) ([0a8e099](https://togithub.com/vitejs/vite-plugin-react/commit/0a8e099)), closes [#69](https://togithub.com/vitejs/vite-plugin-react/issues/69)
### [`v3.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#300-2022-12-09)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/972b8ddca78f47ed730aa76dede28f52b23d8f56...0aaf2e56de64d566af9636877200029ec6437918)
- chore: update vite to ^4.0.0 ([#57](https://togithub.com/vitejs/vite-plugin-react/issues/57)) ([941b20d](https://togithub.com/vitejs/vite-plugin-react/commit/941b20d)), closes [#57](https://togithub.com/vitejs/vite-plugin-react/issues/57)
- chore(deps): update rollup ([#56](https://togithub.com/vitejs/vite-plugin-react/issues/56)) ([af25ec7](https://togithub.com/vitejs/vite-plugin-react/commit/af25ec7)), closes [#56](https://togithub.com/vitejs/vite-plugin-react/issues/56)
- chore!: drop ast check for refresh boundary ([#43](https://togithub.com/vitejs/vite-plugin-react/issues/43)) ([e43bd76](https://togithub.com/vitejs/vite-plugin-react/commit/e43bd76)), closes [#43](https://togithub.com/vitejs/vite-plugin-react/issues/43)
### [`v2.2.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#220-2022-10-26)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/8b48181cd61f42d24fb0912609fa94b333a9ee95...972b8ddca78f47ed730aa76dede28f52b23d8f56)
- fix(deps): update all non-major dependencies ([#10610](https://togithub.com/vitejs/vite-plugin-react/issues/10610)) ([bb95467](https://togithub.com/vitejs/vite/commit/bb95467)), closes [#10610](https://togithub.com/vitejs/vite/issues/10610)
- fix(plugin-react): update `package.json` ([#10479](https://togithub.com/vitejs/vite-plugin-react/issues/10479)) ([7f45eb5](https://togithub.com/vitejs/vite/commit/7f45eb5)), closes [#10479](https://togithub.com/vitejs/vite/issues/10479)
- chore(deps): update all non-major dependencies ([#10393](https://togithub.com/vitejs/vite-plugin-react/issues/10393)) ([f519423](https://togithub.com/vitejs/vite/commit/f519423)), closes [#10393](https://togithub.com/vitejs/vite/issues/10393)
### [`v2.1.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#210-2022-09-05)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/156790f36196603b2d559bb949c11232c251c9da...8b48181cd61f42d24fb0912609fa94b333a9ee95)
- fix(plugin-react): duplicate \*\*self prop and \*\*source prop ([#9387](https://togithub.com/vitejs/vite-plugin-react/issues/9387)) ([c89de3a](https://togithub.com/vitejs/vite/commit/c89de3a)), closes [#9387](https://togithub.com/vitejs/vite/issues/9387)
### [`v2.0.1`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#small201-2022-08-11-small)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/57df81c89034da60b38f92745448bf57a9bb9e1c...156790f36196603b2d559bb949c11232c251c9da)
- fix: don't count class declarations as react fast refresh boundry (fixes [#3675](https://togithub.com/vitejs/vite-plugin-react/issues/3675)) ([#8887](https://togithub.com/vitejs/vite-plugin-react/issues/8887)) ([5a18284](https://togithub.com/vitejs/vite/commit/5a18284)), closes [#3675](https://togithub.com/vitejs/vite/issues/3675) [#8887](https://togithub.com/vitejs/vite/issues/8887)
- fix: mention that Node.js 13/15 support is dropped (fixes [#9113](https://togithub.com/vitejs/vite-plugin-react/issues/9113)) ([#9116](https://togithub.com/vitejs/vite-plugin-react/issues/9116)) ([2826303](https://togithub.com/vitejs/vite/commit/2826303)), closes [#9113](https://togithub.com/vitejs/vite/issues/9113) [#9116](https://togithub.com/vitejs/vite/issues/9116)
- fix(deps): update all non-major dependencies ([#9176](https://togithub.com/vitejs/vite-plugin-react/issues/9176)) ([31d3b70](https://togithub.com/vitejs/vite/commit/31d3b70)), closes [#9176](https://togithub.com/vitejs/vite/issues/9176)
- fix(deps): update all non-major dependencies ([#9575](https://togithub.com/vitejs/vite-plugin-react/issues/9575)) ([8071325](https://togithub.com/vitejs/vite/commit/8071325)), closes [#9575](https://togithub.com/vitejs/vite/issues/9575)
- fix(plugin-react): wrong substitution causes `React is not defined` ([#9386](https://togithub.com/vitejs/vite-plugin-react/issues/9386)) ([8a5b575](https://togithub.com/vitejs/vite/commit/8a5b575)), closes [#9386](https://togithub.com/vitejs/vite/issues/9386)
- docs: fix server options link ([#9242](https://togithub.com/vitejs/vite-plugin-react/issues/9242)) ([29db3ea](https://togithub.com/vitejs/vite/commit/29db3ea)), closes [#9242](https://togithub.com/vitejs/vite/issues/9242)
### [`v2.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#200-2022-07-13)
[Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/968ff695d8ddc7e31285699cf4526a324417ef17...57df81c89034da60b38f92745448bf57a9bb9e1c)
- chore: 3.0 release notes and bump peer deps ([#9072](https://togithub.com/vitejs/vite-plugin-react/issues/9072)) ([427ba26](https://togithub.com/vitejs/vite/commit/427ba26)), closes [#9072](https://togithub.com/vitejs/vite/issues/9072)
- fix(react): sourcemap incorrect warning and classic runtime sourcemap ([#9006](https://togithub.com/vitejs/vite-plugin-react/issues/9006)) ([bdae7fa](https://togithub.com/vitejs/vite/commit/bdae7fa)), closes [#9006](https://togithub.com/vitejs/vite/issues/9006)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^1.3.2
->^4.0.0
Release Notes
vitejs/vite-plugin-react
### [`v4.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#400-2023-04-20) [Compare Source](https://togithub.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 ([#122](https://togithub.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 [#16](https://togithub.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 ([#122](https://togithub.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. ([#129](https://togithub.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 ([#141](https://togithub.com/vitejs/vite-plugin-react/issues/141)) - Wrap dynamic import to speedup analysis ([#143](https://togithub.com/vitejs/vite-plugin-react/issues/143)) Other notable changes: - Silence "use client" warning ([#144](https://togithub.com/vitejs/vite-plugin-react/pull/144), fix [#137](https://togithub.com/vitejs/vite-plugin-react/issues/137)) - Fast Refresh is applied on JS files using automatic runtime ([#122](https://togithub.com/vitejs/vite-plugin-react/pull/122), fix [#83](https://togithub.com/vitejs/vite-plugin-react/issues/83)) - Vite 4.2 is required as a peer dependency ([#128](https://togithub.com/vitejs/vite-plugin-react/pull/128)) - Avoid key collision in React refresh registration ([a74dfef](https://togithub.com/vitejs/vite-plugin-react/commit/a74dfef), fix [#116](https://togithub.com/vitejs/vite-plugin-react/issues/116)) - Throw when refresh runtime is loaded twice ([#108](https://togithub.com/vitejs/vite-plugin-react/pull/108), fix [#101](https://togithub.com/vitejs/vite-plugin-react/issues/101)) - Don't force optimization of jsx-runtime ([#132](https://togithub.com/vitejs/vite-plugin-react/pull/132)) ### [`v3.1.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#310-2023-02-02) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/d758a2a44b0a2cb3c206fa61166cda9d5cf58221...cda8145b8dc5a7211c0e3f8a253b4cac9c2c3d42) - doc: add jsxImportSource option ([38d71f6](https://togithub.com/vitejs/vite-plugin-react/commit/38d71f6)) - chore: bump release-scripts, typecheck package in CI, remove cache for eslint ([9af763d](https://togithub.com/vitejs/vite-plugin-react/commit/9af763d)) - fix: fast-refresh explain link ([#97](https://togithub.com/vitejs/vite-plugin-react/issues/97)) ([6097795](https://togithub.com/vitejs/vite-plugin-react/commit/6097795)), closes [#97](https://togithub.com/vitejs/vite-plugin-react/issues/97) ### [`v3.0.1`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#small301-2023-01-05-small) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/0aaf2e56de64d566af9636877200029ec6437918...d758a2a44b0a2cb3c206fa61166cda9d5cf58221) - fix: don't invalidate when code is invalid ([#67](https://togithub.com/vitejs/vite-plugin-react/issues/67)) ([9231a86](https://togithub.com/vitejs/vite-plugin-react/commit/9231a86)), closes [#67](https://togithub.com/vitejs/vite-plugin-react/issues/67) - fix(deps): update all non-major dependencies ([#69](https://togithub.com/vitejs/vite-plugin-react/issues/69)) ([0a8e099](https://togithub.com/vitejs/vite-plugin-react/commit/0a8e099)), closes [#69](https://togithub.com/vitejs/vite-plugin-react/issues/69) ### [`v3.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#300-2022-12-09) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/972b8ddca78f47ed730aa76dede28f52b23d8f56...0aaf2e56de64d566af9636877200029ec6437918) - chore: update vite to ^4.0.0 ([#57](https://togithub.com/vitejs/vite-plugin-react/issues/57)) ([941b20d](https://togithub.com/vitejs/vite-plugin-react/commit/941b20d)), closes [#57](https://togithub.com/vitejs/vite-plugin-react/issues/57) - chore(deps): update rollup ([#56](https://togithub.com/vitejs/vite-plugin-react/issues/56)) ([af25ec7](https://togithub.com/vitejs/vite-plugin-react/commit/af25ec7)), closes [#56](https://togithub.com/vitejs/vite-plugin-react/issues/56) - chore!: drop ast check for refresh boundary ([#43](https://togithub.com/vitejs/vite-plugin-react/issues/43)) ([e43bd76](https://togithub.com/vitejs/vite-plugin-react/commit/e43bd76)), closes [#43](https://togithub.com/vitejs/vite-plugin-react/issues/43) ### [`v2.2.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#220-2022-10-26) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/8b48181cd61f42d24fb0912609fa94b333a9ee95...972b8ddca78f47ed730aa76dede28f52b23d8f56) - fix(deps): update all non-major dependencies ([#10610](https://togithub.com/vitejs/vite-plugin-react/issues/10610)) ([bb95467](https://togithub.com/vitejs/vite/commit/bb95467)), closes [#10610](https://togithub.com/vitejs/vite/issues/10610) - fix(plugin-react): update `package.json` ([#10479](https://togithub.com/vitejs/vite-plugin-react/issues/10479)) ([7f45eb5](https://togithub.com/vitejs/vite/commit/7f45eb5)), closes [#10479](https://togithub.com/vitejs/vite/issues/10479) - chore(deps): update all non-major dependencies ([#10393](https://togithub.com/vitejs/vite-plugin-react/issues/10393)) ([f519423](https://togithub.com/vitejs/vite/commit/f519423)), closes [#10393](https://togithub.com/vitejs/vite/issues/10393) ### [`v2.1.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#210-2022-09-05) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/156790f36196603b2d559bb949c11232c251c9da...8b48181cd61f42d24fb0912609fa94b333a9ee95) - fix(plugin-react): duplicate \*\*self prop and \*\*source prop ([#9387](https://togithub.com/vitejs/vite-plugin-react/issues/9387)) ([c89de3a](https://togithub.com/vitejs/vite/commit/c89de3a)), closes [#9387](https://togithub.com/vitejs/vite/issues/9387) ### [`v2.0.1`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#small201-2022-08-11-small) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/57df81c89034da60b38f92745448bf57a9bb9e1c...156790f36196603b2d559bb949c11232c251c9da) - fix: don't count class declarations as react fast refresh boundry (fixes [#3675](https://togithub.com/vitejs/vite-plugin-react/issues/3675)) ([#8887](https://togithub.com/vitejs/vite-plugin-react/issues/8887)) ([5a18284](https://togithub.com/vitejs/vite/commit/5a18284)), closes [#3675](https://togithub.com/vitejs/vite/issues/3675) [#8887](https://togithub.com/vitejs/vite/issues/8887) - fix: mention that Node.js 13/15 support is dropped (fixes [#9113](https://togithub.com/vitejs/vite-plugin-react/issues/9113)) ([#9116](https://togithub.com/vitejs/vite-plugin-react/issues/9116)) ([2826303](https://togithub.com/vitejs/vite/commit/2826303)), closes [#9113](https://togithub.com/vitejs/vite/issues/9113) [#9116](https://togithub.com/vitejs/vite/issues/9116) - fix(deps): update all non-major dependencies ([#9176](https://togithub.com/vitejs/vite-plugin-react/issues/9176)) ([31d3b70](https://togithub.com/vitejs/vite/commit/31d3b70)), closes [#9176](https://togithub.com/vitejs/vite/issues/9176) - fix(deps): update all non-major dependencies ([#9575](https://togithub.com/vitejs/vite-plugin-react/issues/9575)) ([8071325](https://togithub.com/vitejs/vite/commit/8071325)), closes [#9575](https://togithub.com/vitejs/vite/issues/9575) - fix(plugin-react): wrong substitution causes `React is not defined` ([#9386](https://togithub.com/vitejs/vite-plugin-react/issues/9386)) ([8a5b575](https://togithub.com/vitejs/vite/commit/8a5b575)), closes [#9386](https://togithub.com/vitejs/vite/issues/9386) - docs: fix server options link ([#9242](https://togithub.com/vitejs/vite-plugin-react/issues/9242)) ([29db3ea](https://togithub.com/vitejs/vite/commit/29db3ea)), closes [#9242](https://togithub.com/vitejs/vite/issues/9242) ### [`v2.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#200-2022-07-13) [Compare Source](https://togithub.com/vitejs/vite-plugin-react/compare/968ff695d8ddc7e31285699cf4526a324417ef17...57df81c89034da60b38f92745448bf57a9bb9e1c) - chore: 3.0 release notes and bump peer deps ([#9072](https://togithub.com/vitejs/vite-plugin-react/issues/9072)) ([427ba26](https://togithub.com/vitejs/vite/commit/427ba26)), closes [#9072](https://togithub.com/vitejs/vite/issues/9072) - fix(react): sourcemap incorrect warning and classic runtime sourcemap ([#9006](https://togithub.com/vitejs/vite-plugin-react/issues/9006)) ([bdae7fa](https://togithub.com/vitejs/vite/commit/bdae7fa)), closes [#9006](https://togithub.com/vitejs/vite/issues/9006)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
This PR has been generated by Mend Renovate. View repository job log here.