babel-plugin-transform-vue-jsx
Advanced tools
Comparing version 1.0.1 to 1.1.0
10
index.js
@@ -85,3 +85,3 @@ var esutils = require('esutils') | ||
* support spread elements. We loop over all attributes, | ||
* breaking on spreads, we then push a new object containg | ||
* breaking on spreads, we then push a new object containing | ||
* all prior attributes to an array for later processing. | ||
@@ -112,3 +112,3 @@ */ | ||
if (objs[0]) { | ||
if (objs[0] && t.isObjectExpression(objs[0])) { | ||
objs[0] = groupProps(objs[0].properties, t) | ||
@@ -125,6 +125,8 @@ } | ||
} | ||
// add prop merging helper | ||
file.addImport('babel-helper-vue-jsx-merge-props', 'default', '_mergeJSXProps') | ||
// spread it | ||
attribs = t.callExpression( | ||
file.addHelper('extends'), | ||
objs | ||
t.identifier('_mergeJSXProps'), | ||
[t.arrayExpression(objs)] | ||
) | ||
@@ -131,0 +133,0 @@ } |
{ | ||
"name": "babel-plugin-transform-vue-jsx", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Babel plugin for Vue 2.0 JSX", | ||
@@ -34,2 +34,3 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"babel-helper-vue-jsx-merge-props": "^1.0.0", | ||
"babel-plugin-syntax-jsx": "^6.8.0" | ||
@@ -39,2 +40,3 @@ }, | ||
"babel-cli": "^6.10.1", | ||
"babel-helper-vue-jsx-merge-props": "^1.0.0", | ||
"babel-plugin-syntax-jsx": "^6.8.0", | ||
@@ -41,0 +43,0 @@ "babel-preset-es2015": "^6.9.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
8222
211
3
10