@vitejs/plugin-react-swc
Advanced tools
Comparing version 3.0.0 to 3.0.1
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; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25568
663
63
Updated@swc/core@^1.3.22