Socket
Socket
Sign inDemoInstall

@vitejs/plugin-legacy

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-legacy - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2

8

index.js

@@ -23,3 +23,2 @@ // @ts-check

const detectDynamicImportVarName = '__vite_is_dynamic_import_support'
const detectDynamicImportVarInitCode = `var ${detectDynamicImportVarName}=false;`
const detectDynamicImportCode = `try{import("_").catch(()=>1);}catch(e){}window.${detectDynamicImportVarName}=true;`

@@ -444,8 +443,2 @@ const dynamicFallbackInlineCode = `!function(){if(window.${detectDynamicImportVarName})return;console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("${legacyPolyfillId}"),n=document.createElement("script");n.src=e.src,n.onload=function(){${systemJSInlineCode}},document.body.appendChild(n)}();`

attrs: { type: 'module' },
children: detectDynamicImportVarInitCode,
injectTo: 'head'
})
tags.push({
tag: 'script',
attrs: { type: 'module' },
children: detectDynamicImportCode,

@@ -719,5 +712,4 @@ injectTo: 'head'

createHash('sha256').update(systemJSInlineCode).digest('base64'),
createHash('sha256').update(detectDynamicImportVarInitCode).digest('base64'),
createHash('sha256').update(detectDynamicImportCode).digest('base64'),
createHash('sha256').update(dynamicFallbackInlineCode).digest('base64')
]

6

package.json
{
"name": "@vitejs/plugin-legacy",
"version": "1.8.1",
"version": "1.8.2",
"license": "MIT",

@@ -25,4 +25,4 @@ "author": "Evan You",

"dependencies": {
"@babel/standalone": "^7.17.9",
"core-js": "^3.21.1",
"@babel/standalone": "^7.17.11",
"core-js": "^3.22.3",
"magic-string": "^0.26.1",

@@ -29,0 +29,0 @@ "regenerator-runtime": "^0.13.9",

@@ -166,3 +166,2 @@ # @vitejs/plugin-legacy [![npm](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg)](https://npmjs.com/package/@vitejs/plugin-legacy)

- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`
- `sha256-xYj09txJ9OsgySe5ommpqul6FiaJZRrwe3KTD7wbV6w=`
- `sha256-4m6wOIrq/wFDmi9Xh3mFM2mwI4ik9n3TMgHk6xDtLxk=`

@@ -169,0 +168,0 @@ - `sha256-uS7/g9fhQwNZS1f/MqYqqKv8y9hCu36IfX9XZB5L7YY=`

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