@parcel/scope-hoisting
Advanced tools
Comparing version 2.0.0-nightly.97 to 2.0.0-nightly.101
@@ -16,7 +16,7 @@ "use strict"; | ||
function generate(bundleGraph, bundle, ast, options) { | ||
function generate(bundleGraph, bundle, ast) { | ||
let { | ||
code | ||
} = (0, _generator.default)(ast, { | ||
minified: options.minify, | ||
minified: bundle.env.minify, | ||
comments: true // retain /*@__PURE__*/ comments for terser | ||
@@ -31,3 +31,3 @@ | ||
if (!options.minify && (isAsync || bundle.env.outputFormat === 'global')) { | ||
if (!bundle.env.minify && (isAsync || bundle.env.outputFormat === 'global')) { | ||
code = `\n${code}`; | ||
@@ -34,0 +34,0 @@ } // Wrap async bundles in a closure and register with parcelRequire so they are executed |
{ | ||
"name": "@parcel/scope-hoisting", | ||
"version": "2.0.0-nightly.97+a63f3fc9", | ||
"version": "2.0.0-nightly.101+fa36fe82", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
@@ -24,7 +24,8 @@ "license": "MIT", | ||
"@babel/types": "^7.3.3", | ||
"@parcel/utils": "2.0.0-nightly.97+a63f3fc9", | ||
"@parcel/diagnostic": "2.0.0-nightly.101+fa36fe82", | ||
"@parcel/utils": "2.0.0-nightly.101+fa36fe82", | ||
"babylon-walk": "^1.0.2", | ||
"nullthrows": "^1.1.1" | ||
}, | ||
"gitHead": "a63f3fc9726483219412920faeb255e035f90747" | ||
"gitHead": "fa36fe822604e5bc19789cd5c1e89b090c3a7471" | ||
} |
// @flow | ||
import type {AST, Bundle, BundleGraph, PluginOptions} from '@parcel/types'; | ||
import type {AST, Bundle, BundleGraph} from '@parcel/types'; | ||
import babelGenerate from '@babel/generator'; | ||
@@ -8,10 +8,5 @@ import nullthrows from 'nullthrows'; | ||
export function generate( | ||
bundleGraph: BundleGraph, | ||
bundle: Bundle, | ||
ast: AST, | ||
options: PluginOptions, | ||
) { | ||
export function generate(bundleGraph: BundleGraph, bundle: Bundle, ast: AST) { | ||
let {code} = babelGenerate(ast, { | ||
minified: options.minify, | ||
minified: bundle.env.minify, | ||
comments: true, // retain /*@__PURE__*/ comments for terser | ||
@@ -28,3 +23,3 @@ }); | ||
let isAsync = entry && !isEntry(bundle, bundleGraph); | ||
if (!options.minify && (isAsync || bundle.env.outputFormat === 'global')) { | ||
if (!bundle.env.minify && (isAsync || bundle.env.outputFormat === 'global')) { | ||
code = `\n${code}`; | ||
@@ -31,0 +26,0 @@ } |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
164456
9
4301