diff --git a/packages/babel-plugin-jsx-dom-expressions/src/universal/element.js b/packages/babel-plugin-jsx-dom-expressions/src/universal/element.js index d962ac29..060e1600 100644 --- a/packages/babel-plugin-jsx-dom-expressions/src/universal/element.js +++ b/packages/babel-plugin-jsx-dom-expressions/src/universal/element.js @@ -324,7 +324,7 @@ function processSpreads(path, attributes, { elem, hasChildren, wrapConditionals (firstSpread || (t.isJSXExpressionContainer(node.value) && isDynamic(attribute.get("value").get("expression"), { checkMember: true }))) && - canNativeSpread(key) + canNativeSpread(key, { checkNameSpaces: true }) ) { const isContainer = t.isJSXExpressionContainer(node.value); const dynamic = diff --git a/packages/babel-plugin-jsx-dom-expressions/test/__ssr_fixtures__/attributeExpressions/output.js b/packages/babel-plugin-jsx-dom-expressions/test/__ssr_fixtures__/attributeExpressions/output.js index 73ef367b..f7f7af2f 100644 --- a/packages/babel-plugin-jsx-dom-expressions/test/__ssr_fixtures__/attributeExpressions/output.js +++ b/packages/babel-plugin-jsx-dom-expressions/test/__ssr_fixtures__/attributeExpressions/output.js @@ -23,8 +23,7 @@ const _tmpl$ = ['Welcome'], _tmpl$17 = ["", ""], _tmpl$18 = ["
", "", "
"], _tmpl$19 = - '
', - _tmpl$20 = ''; + '
'; const selected = true; let id = "my-h1"; let link; @@ -203,4 +202,3 @@ const template28 = _$ssrElement( ); const template29 = _$ssr(_tmpl$17, _$ssrAttribute("attribute", !!someValue, false), !!someValue); const template30 = _$ssr(_tmpl$19); -const template31 = _$ssr(_tmpl$20); diff --git a/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/code.js b/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/code.js index 80ac4d0d..c065a270 100644 --- a/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/code.js +++ b/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/code.js @@ -101,4 +101,6 @@ const template18 = ( /> ); -const template19 =
\ No newline at end of file +const template19 =
+ +const template20 =
; \ No newline at end of file diff --git a/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/output.js b/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/output.js index 1e567223..e9b2f43c 100644 --- a/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/output.js +++ b/packages/babel-plugin-jsx-dom-expressions/test/__universal_fixtures__/attributeExpressions/output.js @@ -225,3 +225,10 @@ const template19 = (() => { ); return _el$28; })(); +const template20 = (() => { + const _el$29 = _$createElement("div"); + _$use(zero, _el$29, () => 0); + _$use(something, _el$29, () => true); + _$spread(_el$29, somethingElse, false); + return _el$29; +})();