babel-plugin-styled-components
Advanced tools
Comparing version 1.9.2 to 1.9.3-0
@@ -58,3 +58,3 @@ "use strict"; | ||
} else if (t.isJSXExpressionContainer(path.node.value)) { | ||
if (t.isTemplateLiteral(path.node.value.expression)) { | ||
if (t.isTemplateLiteral(path.node.value.expression) || t.isObjectExpression(path.node.value.expression)) { | ||
css = path.node.value.expression; | ||
@@ -82,2 +82,7 @@ } else if (t.isTaggedTemplateExpression(path.node.value.expression) && path.node.value.expression.tag.name === 'css') { | ||
if (t.isObjectExpression(css)) { | ||
state.items.push(t.variableDeclaration('var', [t.variableDeclarator(id, t.callExpression(styled, [css]))])); | ||
return; | ||
} | ||
css.expressions = css.expressions.reduce(function (acc, ex) { | ||
@@ -84,0 +89,0 @@ if (Object.entries(bindings).some(function (_ref |
{ | ||
"version": "1.9.2", | ||
"version": "1.9.3-0", | ||
"name": "babel-plugin-styled-components", | ||
@@ -4,0 +4,0 @@ "description": "Improve the debugging experience and add server-side rendering support to styled-components", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
37267
726
2