Releases: vitejs/vite-plugin-react-swc
v3.7.1
v3.7.0
Support HMR for class components
This is a long overdue and should fix some issues people had with HMR when migrating from CRA.
v3.6.0
Add parserConfig option
This will unlock to use the plugin in some use cases where the original source code is not in TS. Using this option to keep using JSX inside .js
files is highly discouraged and can be removed in any future version.
v3.5.0
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 React
in the scope.
Reminder: While being partially supported in Vite, publishing TS & JSX outside of internal libraries is highly discouraged.
v3.4.1
Add support for .mts
(fixes #161)
Using CJS in source code will not work in Vite (and will never be supported), so this is better to only use .ts
.
But to better align with Vite core defaults, .mts
extension will now be processed like .ts
. This maybe reverted in a future major.
v3.4.0
v3.3.2
- Support Vitest deps.experimentalOptimizer (#115)
v3.3.1
- Add
type: module
to package.json (#101). Because the library already publish.cjs
&.mjs
files, the only change is for typing when using the node16 module resolution (fixes #95) - Throw an error when the MDX plugin is after this one (#100). This is an expected breaking change added in
3.2.0
and this should people that were using both plugins before this version to migrate.
v3.3.0
- Support TS/JSX in node_modules to help the community experiment with it. Note that for now this not supported by TS and errors from these files cannot be silenced if the user is using a stricter configuration than the library author: microsoft/TypeScript#30511. I advise to use it only for internal libraries for now (fixes #53)
- Silence
"use client"
warning when building library like@tanstack/react-query
- Fix fast refresh issue when exporting a component with a name that shadow another local component
This release goes in hand with the upcoming Vite 4.3 release focusing on performances: