babel-plugin-transform-inline-environment-variables
Advanced tools
Comparing version 0.5.0-alpha.9 to 0.5.0-alpha.42
@@ -6,2 +6,6 @@ "use strict"; | ||
}) { | ||
function isLeftSideOfAssignmentExpression(path) { | ||
return t.isAssignmentExpression(path.parent) && path.parent.left === path.node; | ||
} | ||
return { | ||
@@ -19,3 +23,3 @@ name: "transform-inline-environment-variables", | ||
if (t.isStringLiteral(key) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) { | ||
if (t.isStringLiteral(key) && !isLeftSideOfAssignmentExpression(path) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) { | ||
path.replaceWith(t.valueToNode(process.env[key.value])); | ||
@@ -22,0 +26,0 @@ } |
{ | ||
"name": "babel-plugin-transform-inline-environment-variables", | ||
"version": "0.5.0-alpha.9+7002b8c", | ||
"version": "0.5.0-alpha.42+cda70da", | ||
"description": "Inline environment variables.", | ||
@@ -14,3 +14,3 @@ "keywords": [ | ||
"repository": "https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-inline-environment-variables", | ||
"gitHead": "7002b8cb72b9adf05eb80de4b3114bcf3c20da19" | ||
"gitHead": "cda70da04a64a4311eaf8c9b3fb2333539dec096" | ||
} |
3425
25