New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vitejs/plugin-react-swc

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-react-swc - npm Package Versions

2

3.8.1

Diff
vitebot
published 3.8.1 •
vitebot
published 3.8.0 •

Changelog

Source

3.8.0

Add useAtYourOwnRisk_mutateSwcOptions option

The future of Vite is with OXC, and from the beginning this was a design choice to not exposed too many specialties from SWC so that Vite React users can move to another transformer later. Also debugging why some specific version of decorators with some other unstable/legacy feature doesn't work is not fun, so we won't provide support for it, hence the name useAtYourOwnRisk.

react({
  useAtYourOwnRisk_mutateSwcOptions(options) {
    options.jsc.parser.decorators = true;
    options.jsc.transform.decoratorVersion = "2022-03";
  },
});
vitebot
published 3.7.2 •

Changelog

Source

3.7.2

vitebot
published 3.7.1 •

Changelog

Source

3.7.1

Ignore directive sourcemap error #231

vitebot
published 3.7.0 •

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 •
2