Socket
Socket
Sign inDemoInstall

@vitejs/plugin-react-swc

Package Overview
Dependencies
1
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

3.7.0

Diff

Changelog

Source

3.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.

vitebot
published 3.6.0 •

Changelog

Source

3.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.

vitebot
published 3.5.0 •

Changelog

Source

3.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.

vitebot
published 3.4.1 •

Changelog

Source

3.4.1

vitebot
published 3.4.0 •

Changelog

Source

3.4.0

  • Add devTarget option (fixes #141)
  • Disable Fast Refresh based on config.server.hmr === false instead of process.env.TEST
  • Warn when plugin is in WebContainers (see #118)
  • Better invalidation message when an export is added & fix HMR for export of nullish values (#143)
vitebot
published 3.3.2 •

vitebot
published 3.3.1 •

Changelog

Source

3.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.
vitebot
published 3.3.0 •

Changelog

Source

3.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: https://github.com/microsoft/TypeScript/issues/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:

  • Move resolve of runtime code into a "pre" plugin (#79)
  • Wrap dynamic import to speedup analysis (#80)
vitebot
published 3.2.0 •

Changelog

Source

3.2.0

  • Support HMR for MDX (fixes #52)
  • Fix: when using plugins, apply SWC before esbuild so that automatic runtime is respected for JSX (fixes #56)
  • Fix: use jsxImportSource in optimizeDeps
vitebot
published 3.1.0 •

Changelog

Source

3.1.0

  • Support plugins via the new plugins options
  • Support TypeScript decorators via the new tsDecorators option. This requires experimentalDecorators in tsconfig.
  • Fix HMR for styled components exported alongside other components
  • Update embedded refresh runtime to 0.14 (fixes #46)
2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc