Socket
Socket
Sign inDemoInstall

@vitejs/plugin-react

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-react - npm Package Compare versions

Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc