babel-plugin-transform-vue-jsx
Advanced tools
Comparing version 2.0.2 to 3.0.0
var esutils = require('esutils') | ||
var isReservedTag = require('./lib/is-reserved') | ||
var groupProps = require('./lib/group-props') | ||
@@ -18,10 +17,4 @@ | ||
var callExpr = buildElementCall(path.get('openingElement'), file) | ||
var tag = callExpr.arguments[0] | ||
var children = t.arrayExpression(path.node.children) | ||
if (!t.isStringLiteral(tag) || !isReservedTag(tag.value)) { | ||
// if this is a non-reserved tag, children needs to be a thunk | ||
children = t.arrowFunctionExpression([], children) | ||
} | ||
// add children array as 3rd arg | ||
callExpr.arguments.push(children) | ||
callExpr.arguments.push(t.arrayExpression(path.node.children)) | ||
if (callExpr.arguments.length >= 3) { | ||
@@ -28,0 +21,0 @@ callExpr._prettyCall = true |
{ | ||
"name": "babel-plugin-transform-vue-jsx", | ||
"version": "2.0.2", | ||
"version": "3.0.0", | ||
"description": "Babel plugin for Vue 2.0 JSX", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,6 @@ # babel-plugin-transform-vue-jsx [![CircleCI](https://img.shields.io/circleci/project/vuejs/babel-plugin-transform-vue-jsx.svg?maxAge=2592000)](https://circleci.com/gh/vuejs/babel-plugin-transform-vue-jsx) | ||
### Compatibility Notice | ||
Version ^3.0.0 works only with vue@^2.0.0-beta.7. | ||
### Requirements | ||
@@ -7,0 +11,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
148
10445
5
179