@vitejs/plugin-react
Advanced tools
+12
-1
@@ -144,5 +144,6 @@ 'use strict'; | ||
| const jsxImportDevRuntime = `${jsxImportSource}/jsx-dev-runtime`; | ||
| let runningInVite = false; | ||
| let isProduction = true; | ||
| let projectRoot = process.cwd(); | ||
| let skipFastRefresh = false; | ||
| let skipFastRefresh = true; | ||
| let runPluginOverrides; | ||
@@ -186,2 +187,3 @@ let staticBabelOptions; | ||
| configResolved(config) { | ||
| runningInVite = true; | ||
| projectRoot = config.root; | ||
@@ -212,2 +214,11 @@ isProduction = config.isProduction; | ||
| }, | ||
| options(options) { | ||
| if (!runningInVite) { | ||
| options.jsx = { | ||
| mode: opts.jsxRuntime, | ||
| importSource: opts.jsxImportSource | ||
| }; | ||
| return options; | ||
| } | ||
| }, | ||
| transform: { | ||
@@ -214,0 +225,0 @@ filter: { |
+12
-1
@@ -128,5 +128,6 @@ import { dirname, join } from 'node:path'; | ||
| const jsxImportDevRuntime = `${jsxImportSource}/jsx-dev-runtime`; | ||
| let runningInVite = false; | ||
| let isProduction = true; | ||
| let projectRoot = process.cwd(); | ||
| let skipFastRefresh = false; | ||
| let skipFastRefresh = true; | ||
| let runPluginOverrides; | ||
@@ -170,2 +171,3 @@ let staticBabelOptions; | ||
| configResolved(config) { | ||
| runningInVite = true; | ||
| projectRoot = config.root; | ||
@@ -196,2 +198,11 @@ isProduction = config.isProduction; | ||
| }, | ||
| options(options) { | ||
| if (!runningInVite) { | ||
| options.jsx = { | ||
| mode: opts.jsxRuntime, | ||
| importSource: opts.jsxImportSource | ||
| }; | ||
| return options; | ||
| } | ||
| }, | ||
| transform: { | ||
@@ -198,0 +209,0 @@ filter: { |
+10
-4
| { | ||
| "name": "@vitejs/plugin-react", | ||
| "version": "4.5.2", | ||
| "version": "4.6.0", | ||
| "license": "MIT", | ||
@@ -36,3 +36,4 @@ "author": "Evan You", | ||
| "patch-cjs": "tsx ../../scripts/patchCJS.ts", | ||
| "prepublishOnly": "npm run build" | ||
| "prepublishOnly": "npm run build", | ||
| "test-unit": "vitest run" | ||
| }, | ||
@@ -55,3 +56,3 @@ "engines": { | ||
| "@babel/plugin-transform-react-jsx-source": "^7.27.1", | ||
| "@rolldown/pluginutils": "1.0.0-beta.11", | ||
| "@rolldown/pluginutils": "1.0.0-beta.19", | ||
| "@types/babel__core": "^7.20.5", | ||
@@ -65,4 +66,9 @@ "react-refresh": "^0.17.0" | ||
| "@vitejs/react-common": "workspace:*", | ||
| "unbuild": "^3.5.0" | ||
| "babel-plugin-react-compiler": "19.1.0-rc.2", | ||
| "react": "^19.1.0", | ||
| "react-dom": "^19.1.0", | ||
| "rolldown": "1.0.0-beta.19", | ||
| "unbuild": "^3.5.0", | ||
| "vitest": "^3.2.4" | ||
| } | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
63656
1.12%1454
1.54%7
250%+ Added
- Removed