@vue/babel-preset-jsx
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopDefault(a){return a&&"object"==typeof a&&"default"in a?a["default"]:a}var babelPluginTransformVueJsx=_interopDefault(require("@vue/babel-plugin-transform-vue-jsx")),babelSugarFunctionalVue=_interopDefault(require("@vue/babel-sugar-functional-vue")),babelSugarInjectH=_interopDefault(require("@vue/babel-sugar-inject-h")),babelSugarVModel=_interopDefault(require("@vue/babel-sugar-v-model")),babelSugarVOn=_interopDefault(require("@vue/babel-sugar-v-on")),index=(a,{functional:b=!0,injectH:c=!0,vModel:d=!0,vOn:e=!0}={})=>({plugins:[b&&babelSugarFunctionalVue,c&&babelSugarInjectH,d&&babelSugarVModel,e&&babelSugarVOn,babelPluginTransformVueJsx].filter(Boolean)});module.exports=index; | ||
"use strict";function _interopDefault(a){return a&&"object"==typeof a&&"default"in a?a["default"]:a}var babelPluginTransformVueJsx=_interopDefault(require("@vue/babel-plugin-transform-vue-jsx")),babelSugarFunctionalVue=_interopDefault(require("@vue/babel-sugar-functional-vue")),babelSugarInjectH=_interopDefault(require("@vue/babel-sugar-inject-h")),babelSugarCompositionApiInjectH=_interopDefault(require("@vue/babel-sugar-composition-api-inject-h")),babelSugarCompositionApiRenderInstance=_interopDefault(require("@vue/babel-sugar-composition-api-render-instance")),babelSugarVModel=_interopDefault(require("@vue/babel-sugar-v-model")),babelSugarVOn=_interopDefault(require("@vue/babel-sugar-v-on")),index=(a,{functional:b=!0,injectH:c=!0,vModel:d=!0,vOn:e=!0,compositionAPI:f=!1}={})=>({plugins:[b&&babelSugarFunctionalVue,c&&(f?babelSugarCompositionApiInjectH:babelSugarInjectH),d&&babelSugarVModel,e&&babelSugarVOn,f&&babelSugarCompositionApiRenderInstance,babelPluginTransformVueJsx].filter(Boolean)});module.exports=index; |
{ | ||
"name": "@vue/babel-preset-jsx", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Babel preset for Vue JSX", | ||
@@ -16,8 +16,8 @@ "main": "dist/plugin.cjs.js", | ||
"dependencies": { | ||
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", | ||
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2", | ||
"@vue/babel-sugar-functional-vue": "^1.1.2", | ||
"@vue/babel-sugar-inject-h": "^1.1.2", | ||
"@vue/babel-sugar-v-model": "^1.1.2", | ||
"@vue/babel-sugar-v-on": "^1.1.2" | ||
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.0", | ||
"@vue/babel-plugin-transform-vue-jsx": "^1.2.0", | ||
"@vue/babel-sugar-functional-vue": "^1.2.0", | ||
"@vue/babel-sugar-inject-h": "^1.2.0", | ||
"@vue/babel-sugar-v-model": "^1.2.0", | ||
"@vue/babel-sugar-v-on": "^1.2.0" | ||
}, | ||
@@ -31,3 +31,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "67d6d39beab9f853118b4e0bbe901f5899ae7245" | ||
"gitHead": "a6f821f59f55f5dcb9de8850d2105ebd92e1c864" | ||
} |
@@ -20,22 +20,23 @@ ## @vue/babel-preset-jsx | ||
In your `.babelrc`: | ||
In your `babel.config.js`: | ||
```json | ||
{ | ||
"presets": ["@vue/babel-preset-jsx"] | ||
```js | ||
module.exports = { | ||
presets: ['@vue/babel-preset-jsx'], | ||
} | ||
``` | ||
You can toggle specific features, by default all features are enabled, e.g.: | ||
You can toggle specific features, by default all features (except `compositionAPI`) are enabled, e.g.: | ||
```json | ||
{ | ||
"presets": [ | ||
```js | ||
module.exports = { | ||
presets: [ | ||
[ | ||
"@vue/babel-preset-jsx", | ||
'@vue/babel-preset-jsx', | ||
{ | ||
"vModel": false | ||
} | ||
] | ||
] | ||
vModel: false, | ||
compositionAPI: true, | ||
}, | ||
], | ||
], | ||
} | ||
@@ -46,2 +47,3 @@ ``` | ||
- `compositionAPI` - Enables [@vue/babel-sugar-composition-api-inject-h](../babel-sugar-composition-api-inject-h) and [@vue/babel-sugar-composition-api-render-instance](../babel-sugar-composition-api-render-instance), support returning render function in `setup`. | ||
- `functional` [@vue/babel-sugar-functional-vue](../babel-sugar-functional-vue/README.md) - Functional components syntactic sugar | ||
@@ -48,0 +50,0 @@ - `injectH` [@vue/babel-sugar-inject-h](../babel-sugar-inject-h/README.md) - Automatic `h` injection syntactic sugar |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3523
4
51