Socket
Socket
Sign inDemoInstall

@vitejs/plugin-legacy

Package Overview
Dependencies
Maintainers
3
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.5.2 to 1.5.3

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## [1.5.3](https://github.com/vitejs/vite/compare/plugin-legacy@1.5.2...plugin-legacy@1.5.3) (2021-09-07)
### Bug Fixes
* **plugin-legacy:** fix regression introduced in [#4536](https://github.com/vitejs/vite/issues/4536) ([#4861](https://github.com/vitejs/vite/issues/4861)) ([fdc3212](https://github.com/vitejs/vite/commit/fdc3212474ff951e7e67810eca6cfb3ef1ed9ea2))
* **plugin-legacy:** skip in SSR build ([#4536](https://github.com/vitejs/vite/issues/4536)) ([1f068fc](https://github.com/vitejs/vite/commit/1f068fcec38fc07c34e75a19821064386e460907))
## [1.5.2](https://github.com/vitejs/vite/compare/plugin-legacy@1.5.1...plugin-legacy@1.5.2) (2021-09-01)

@@ -2,0 +12,0 @@

23

index.js

@@ -100,3 +100,3 @@ // @ts-check

configResolved(config) {
if (config.build.minify === 'esbuild') {
if (!config.build.ssr && config.build.minify === 'esbuild') {
throw new Error(

@@ -110,2 +110,6 @@ `Can't use esbuild as the minifier when targeting legacy browsers ` +

async generateBundle(opts, bundle) {
if (config.build.ssr) {
return
}
if (!isLegacyBundle(bundle, opts)) {

@@ -175,3 +179,3 @@ if (!modernPolyfills.size) {

if (!genLegacy) {
if (!genLegacy || config.build.ssr) {
return

@@ -232,2 +236,6 @@ }

renderChunk(raw, chunk, opts) {
if (config.build.ssr) {
return
}
if (!isLegacyChunk(chunk, opts)) {

@@ -322,2 +330,3 @@ if (

transformIndexHtml(html, { chunk }) {
if (config.build.ssr) return
if (!chunk) return

@@ -428,2 +437,6 @@ if (chunk.fileName.includes('-legacy')) {

generateBundle(opts, bundle) {
if (config.build.ssr) {
return
}
if (isLegacyBundle(bundle, opts)) {

@@ -447,3 +460,3 @@ // avoid emitting duplicate assets

config(_, env) {
config(config, env) {
if (env) {

@@ -453,3 +466,5 @@ return {

'import.meta.env.LEGACY':
env.command === 'serve' ? false : legacyEnvVarMarker
env.command === 'serve' || config.build.ssr
? false
: legacyEnvVarMarker
}

@@ -456,0 +471,0 @@ }

2

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

@@ -5,0 +5,0 @@ "author": "Evan You",

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