babel-plugin-minify-dead-code-elimination
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -50,3 +50,2 @@ "use strict"; | ||
Function: { | ||
// Let's take all the vars in a function that are not in the top level scope and hoist them | ||
@@ -367,3 +366,2 @@ // with the first var declaration in the top-level scope. This transform in itself may | ||
if (binding.references === 1 && binding.kind !== "param" && binding.kind !== "module" && binding.constant) { | ||
var replacement = binding.path.node; | ||
@@ -379,3 +377,2 @@ var replacementPath = binding.path; | ||
if (t.isVariableDeclarator(replacement)) { | ||
var _prevSiblings = prevSiblings(replacementPath); | ||
@@ -782,3 +779,3 @@ | ||
// `function.name` all minifiers do it and hence became a standard. | ||
"FunctionExpression"(path) { | ||
FunctionExpression(path) { | ||
if (!this.keepFnName) { | ||
@@ -790,3 +787,3 @@ removeUnreferencedId(path); | ||
// remove class names | ||
"ClassExpression"(path) { | ||
ClassExpression(path) { | ||
if (!this.keepClassName) { | ||
@@ -817,3 +814,5 @@ removeUnreferencedId(path); | ||
if (binding.path.parentPath.parentPath.isForInStatement({ left: binding.path.parent })) { | ||
if (binding.path.parentPath.parentPath.isForInStatement({ | ||
left: binding.path.parent | ||
})) { | ||
return; | ||
@@ -820,0 +819,0 @@ } |
{ | ||
"name": "babel-plugin-minify-dead-code-elimination", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "", | ||
@@ -15,4 +15,4 @@ "homepage": "https://github.com/babel/babili#readme", | ||
"dependencies": { | ||
"babel-helper-mark-eval-scopes": "^0.0.3", | ||
"babel-helper-remove-or-void": "^0.0.1", | ||
"babel-helper-mark-eval-scopes": "^0.1.0", | ||
"babel-helper-remove-or-void": "^0.1.0", | ||
"lodash.some": "^4.6.0" | ||
@@ -19,0 +19,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
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
42693
1103
+ Addedbabel-helper-mark-eval-scopes@0.1.1(transitive)
+ Addedbabel-helper-remove-or-void@0.1.1(transitive)
- Removedbabel-helper-mark-eval-scopes@0.0.3(transitive)
- Removedbabel-helper-remove-or-void@0.0.1(transitive)