babel-plugin-emotion-rename
Advanced tools
Comparing version 1.0.0-beta.7 to 1.0.0-beta.8
@@ -140,2 +140,3 @@ "use strict"; | ||
ImportDeclaration: function ImportDeclaration(path, state) { | ||
console.log("imp-declare---"); | ||
var isReactEmotionImport = path.node.source.value === "react-emotion"; | ||
@@ -207,2 +208,4 @@ | ||
if (node.callee.name === "require" && node.arguments && node.arguments.length === 1 && t.isStringLiteral(node.arguments[0]) && isModule(node.arguments[0].value, original)) { | ||
console.log("require-declare---"); | ||
if (path.scope.bindings.styled && /(react-)?emotion/.test(node.arguments[0].value)) { | ||
@@ -209,0 +212,0 @@ path.node.arguments = [t.stringLiteral("@emotion/styled")]; |
{ | ||
"name": "babel-plugin-emotion-rename", | ||
"version": "1.0.0-beta.7", | ||
"version": "1.0.0-beta.8", | ||
"description": "Babel plugin to rename old Emotion 9 import to new Emotion 10+ import", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
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
15465
221