first commit
This commit is contained in:
56
app_vue/node_modules/@vue/babel-preset-jsx/README.md
generated
vendored
Normal file
56
app_vue/node_modules/@vue/babel-preset-jsx/README.md
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
## @vue/babel-preset-jsx
|
||||
|
||||
Configurable preset for Vue JSX plugins.
|
||||
|
||||
### Babel Compatibility Notes
|
||||
|
||||
- This repo is only compatible with Babel 7.x, for 6.x please use [vuejs/babel-plugin-transform-vue-jsx](https://github.com/vuejs/babel-plugin-transform-vue-jsx)
|
||||
|
||||
### Usage
|
||||
|
||||
Install the dependencies:
|
||||
|
||||
```sh
|
||||
# for yarn:
|
||||
yarn add @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props
|
||||
# for npm:
|
||||
npm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props --save
|
||||
```
|
||||
|
||||
In your `babel.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
presets: ['@vue/babel-preset-jsx'],
|
||||
}
|
||||
```
|
||||
|
||||
You can toggle specific features, by default all features (except `compositionAPI`) are enabled, e.g.:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@vue/babel-preset-jsx',
|
||||
{
|
||||
vModel: false,
|
||||
compositionAPI: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
Options are:
|
||||
|
||||
- `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`.
|
||||
- The default value is `false`;
|
||||
- When set to `'auto'` (or `true`), it will detect the Vue version in the project. If it's >= 2.7, it will import the composition utilities from `vue`, otherwise from `@vue/composition-api`;
|
||||
- When set to `'native'` (or `'naruto'`), it will always import the composition utilities from `vue`
|
||||
- When set to `plugin`, it will always import the composition utilities from `@vue/composition-api`, but it will redirect to `'vue'` itself when the vue version is `2.7.x`
|
||||
- When set to `vue-demi`, it will always import the composition utilities from `vue-demi`
|
||||
- When set to an object like `{ importSource: string; }`, it will always import the composition utilities from the importSource you set
|
||||
- `functional` [@vue/babel-sugar-functional-vue](../babel-sugar-functional-vue/README.md) - Functional components syntactic sugar
|
||||
- `injectH` [@vue/babel-sugar-inject-h](../babel-sugar-inject-h/README.md) - Automatic `h` injection syntactic sugar
|
||||
- `vModel` [@vue/babel-sugar-v-model](../babel-sugar-v-model/README.md) - `vModel` syntactic sugar
|
||||
- `vOn` [@vue/babel-sugar-v-on](../babel-sugar-v-on/README.md) - `vOn` syntactic sugar
|
1
app_vue/node_modules/@vue/babel-preset-jsx/dist/plugin.cjs.js
generated
vendored
Normal file
1
app_vue/node_modules/@vue/babel-preset-jsx/dist/plugin.cjs.js
generated
vendored
Normal file
@ -0,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")),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}={})=>{let g=babelSugarInjectH,h="@vue/composition-api";if(f){if(["native","naruto"].includes(f)&&(h="vue"),"vue-demi"===f&&(h="vue-demi"),["auto",!0].includes(f))try{const a=require("vue/package.json").version;a.startsWith("2.7")&&(h="vue")}catch(a){}"object"==typeof f&&f.importSource&&(h=f.importSource),g=[babelSugarCompositionApiInjectH,{importSource:h}]}return{plugins:[b&&babelSugarFunctionalVue,c&&g,d&&babelSugarVModel,e&&babelSugarVOn,f&&[babelSugarCompositionApiRenderInstance,{importSource:h}],babelPluginTransformVueJsx].filter(Boolean)}};module.exports=index;
|
42
app_vue/node_modules/@vue/babel-preset-jsx/package.json
generated
vendored
Normal file
42
app_vue/node_modules/@vue/babel-preset-jsx/package.json
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@vue/babel-preset-jsx",
|
||||
"version": "1.4.0",
|
||||
"description": "Babel preset for Vue JSX",
|
||||
"main": "dist/plugin.cjs.js",
|
||||
"repository": "https://github.com/vuejs/jsx/tree/master/packages/babel-preset-jsx",
|
||||
"author": "Nick Messing <dot.nick.dot.messing@gmail.com>",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [],
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"prerelease": "yarn build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
||||
"@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
|
||||
"@vue/babel-sugar-composition-api-inject-h": "^1.4.0",
|
||||
"@vue/babel-sugar-composition-api-render-instance": "^1.4.0",
|
||||
"@vue/babel-sugar-functional-vue": "^1.4.0",
|
||||
"@vue/babel-sugar-inject-h": "^1.4.0",
|
||||
"@vue/babel-sugar-v-model": "^1.4.0",
|
||||
"@vue/babel-sugar-v-on": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rollup": "^0.67.4",
|
||||
"rollup-plugin-babel-minify": "^6.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0",
|
||||
"vue": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"vue": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"gitHead": "6566e12067f5d6c02d3849b574a1b84de5634008"
|
||||
}
|
Reference in New Issue
Block a user