Socket
Socket
Sign inDemoInstall

@vitejs/plugin-react-swc

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-react-swc - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

9

index.d.ts
import { PluginOption } from "vite";
declare const react: () => PluginOption[];
type Options = {
/**
* Control where the JSX factory is imported from.
* @default "react"
*/
jsxImportSource?: string;
};
declare const react: (options?: Options) => PluginOption[];
export default react;

6

package.json
{
"name": "@vitejs/plugin-react-swc",
"description": "Speed up your Vite dev server with SWC",
"version": "3.0.0",
"version": "3.0.1",
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",

@@ -27,7 +27,7 @@ "license": "MIT",

"peerDependencies": {
"vite": "^4.0.0"
"vite": "^4"
},
"dependencies": {
"@swc/core": "^1.3.21"
"@swc/core": "^1.3.22"
}
}

@@ -37,2 +37,15 @@ # @vitejs/plugin-react-swc [![npm](https://img.shields.io/npm/v/@vitejs/plugin-react-swc)](https://www.npmjs.com/package/@vitejs/plugin-react-swc)

## Changing the JSX import source
You can use the jsxImportSource option like this:
```ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
export default defineConfig({
plugins: [react({ jsxImportSource: "@emotion/react" })],
});
```
## Consistent components exports

@@ -39,0 +52,0 @@

@@ -412,4 +412,11 @@ /*! Copyright (c) Meta Platforms, Inc. and affiliates. **/

}
var refresh_runtime_default = {
getRefreshReg,
injectIntoGlobalHook,
createSignatureFunctionForTransform,
validateRefreshBoundaryAndEnqueueUpdate
};
export {
createSignatureFunctionForTransform,
refresh_runtime_default as default,
getRefreshReg,

@@ -416,0 +423,0 @@ injectIntoGlobalHook,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc