chore(deps-dev): bump @vitejs/plugin-react-swc from 3.11.0 to 4.2.0
Bumps @vitejs/plugin-react-swc from 3.11.0 to 4.2.0.
Release notes
Sourced from @vitejs/plugin-react-swc's releases.
[email protected]
Update peer dependency range to target Vite 5
There were no breaking change that impacted this plugin, so any combination of React plugins and Vite core version will work.
Align jsx runtime for optimized dependencies
This will only affect people using internal libraries that contains untranspiled JSX. This change aligns the optimizer with the source code and avoid issues when the published source don't have
Reactin the scope.Reminder: While being partially supported in Vite, publishing TS & JSX outside of internal libraries is highly discouraged.
[email protected]
Add
@vitejs/plugin-react-swc/preamblevirtual module for SSR HMR (#890)SSR applications can now initialize HMR runtime by importing
@vitejs/plugin-react-swc/preambleat the top of their client entry instead of manually callingtransformIndexHtml. This simplifies SSR setup for applications that don't use thetransformIndexHtmlAPI.Use SWC when useAtYourOwnRisk_mutateSwcOptions is provided (#951)
Previously, this plugin did not use SWC if plugins were not provided even if
useAtYourOwnRisk_mutateSwcOptionswas provided. This is now fixed.[email protected]
- Enable retainLines to get correct line numbers for jsxDev (fix #235)
[email protected]
- Add
@types/babel__coresto dependencies (fix #211)- Improve build perf when not using Babel plugins by lazy loading
@babel/core#212- Better invalidation message when an export is added & fix HMR for export of nullish values #215
- Include non-dev jsx runtime in optimizeDeps & support HMR for JS files using the non dev runtime #224
- The build output now contains a
index.d.ctsfile so you don't get types errors when settingmoduleResolutiontonode16ornodenextin your tsconfig (we recommend usingbundlerwhich is more close to how Vite works)[email protected]
Set SWC cacheRoot options
This is set to
{viteCacheDir}/swcand override the default of.swc.Perf: simplify refresh wrapper generation (#835)
[email protected]
- Fix #198: Enable Babel if presets list is not empty
[email protected]
- Revert #108: Remove throw when refresh runtime is loaded twice to enable usage in micro frontend apps. This was added to help fix setup usage, and this is not worth an annoying warning for others or a config parameter.
[email protected]
- Fix fast-refresh for files that are transformed into jsx (#188)
[email protected]
- Support Vitest deps.experimentalOptimizer
- Support using components inside web workers (#181)
... (truncated)
Changelog
Sourced from @vitejs/plugin-react-swc's changelog.
4.2.0 (2025-10-24)
Add
@vitejs/plugin-react-swc/preamblevirtual module for SSR HMR (#890)SSR applications can now initialize HMR runtime by importing
@vitejs/plugin-react-swc/preambleat the top of their client entry instead of manually callingtransformIndexHtml. This simplifies SSR setup for applications that don't use thetransformIndexHtmlAPI.Use SWC when useAtYourOwnRisk_mutateSwcOptions is provided (#951)
Previously, this plugin did not use SWC if plugins were not provided even if
useAtYourOwnRisk_mutateSwcOptionswas provided. This is now fixed.4.1.0 (2025-09-17)
Set SWC cacheRoot options
This is set to
{viteCacheDir}/swcand override the default of.swc.Perf: simplify refresh wrapper generation (#835)
4.0.1 (2025-08-19)
Set
optimizeDeps.rollupOptions.transform.jsxinstead ofoptimizeDeps.rollupOptions.jsxfor rolldown-vite (#735)
optimizeDeps.rollupOptions.jsxis going to be deprecated in favor ofoptimizeDeps.rollupOptions.transform.jsx.4.0.0 (2025-08-07)
4.0.0-beta.0 (2025-07-28)
Require Node 20.19+, 22.12+
This plugin now requires Node 20.19+ or 22.12+.
Commits
- See full diff in compare view
Maintainer changes
This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for @vitejs/plugin-react-swc since your current version.
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.