@vitejs/plugin-react
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
{ | ||
"name": "@vitejs/plugin-react", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Evan You", |
import fs from 'fs' | ||
import path from 'path' | ||
import { createRequire } from 'module' | ||
import type { types as t } from '@babel/core' | ||
@@ -7,4 +8,5 @@ | ||
const _require = createRequire(import.meta.url) | ||
const reactRefreshDir = path.dirname( | ||
require.resolve('react-refresh/package.json') | ||
_require.resolve('react-refresh/package.json') | ||
) | ||
@@ -11,0 +13,0 @@ const runtimeFilePath = path.join( |
import type * as babelCore from '@babel/core' | ||
import type { Visitor, types as t } from '@babel/core' | ||
@@ -14,3 +13,3 @@ /** | ||
export function babelImportToRequire({ types: t }: typeof babelCore): { | ||
visitor: Visitor | ||
visitor: babelCore.Visitor | ||
} { | ||
@@ -21,3 +20,3 @@ return { | ||
const decl = path.node | ||
const spec = decl.specifiers[0] as t.ImportSpecifier | ||
const spec = decl.specifiers[0] as babelCore.types.ImportSpecifier | ||
@@ -24,0 +23,0 @@ path.replaceWith( |
import type * as babelCore from '@babel/core' | ||
import type { PluginItem, types as t } from '@babel/core' | ||
type RestoredJSX = [result: t.File | null | undefined, isCommonJS: boolean] | ||
type RestoredJSX = [ | ||
result: babelCore.types.File | null | undefined, | ||
isCommonJS: boolean | ||
] | ||
let babelRestoreJSX: Promise<PluginItem> | undefined | ||
let babelRestoreJSX: Promise<babelCore.PluginItem> | undefined | ||
@@ -8,0 +10,0 @@ const jsxNotFound: RestoredJSX = [null, false] |
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
74389
1983
5