mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-15 08:19:16 +08:00
refactor
This commit is contained in:
parent
5dcfdd8833
commit
4885b3e7c7
@ -8,6 +8,13 @@
|
|||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./dist/index.mjs",
|
||||||
|
"require": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/vuejs/babel-plugin-jsx"
|
"url": "git+https://github.com/vuejs/babel-plugin-jsx"
|
||||||
@ -30,7 +37,7 @@
|
|||||||
"@babel/helper-module-imports": "^7.22.5",
|
"@babel/helper-module-imports": "^7.22.5",
|
||||||
"@babel/parser": "^7.22.11",
|
"@babel/parser": "^7.22.11",
|
||||||
"@babel/plugin-syntax-typescript": "^7.22.5",
|
"@babel/plugin-syntax-typescript": "^7.22.5",
|
||||||
"@vue/compiler-sfc": "link:/Users/kevin/Developer/open-source/vue/vue-core/packages/compiler-sfc"
|
"@vue/compiler-sfc": "^3.3.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.22.11",
|
"@babel/core": "^7.22.11",
|
||||||
|
@ -38,7 +38,7 @@ export default ({
|
|||||||
const props = comp.params[0];
|
const props = comp.params[0];
|
||||||
if (!props) return;
|
if (!props) return;
|
||||||
|
|
||||||
if (props.type === 'AssignmentPattern' && 'typeAnnotation' in props.left) {
|
if (props.type === 'AssignmentPattern') {
|
||||||
ctx!.propsTypeDecl = getTypeAnnotation(props.left);
|
ctx!.propsTypeDecl = getTypeAnnotation(props.left);
|
||||||
ctx!.propsRuntimeDefaults = props.right;
|
ctx!.propsRuntimeDefaults = props.right;
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,8 +129,8 @@ importers:
|
|||||||
specifier: ^7.22.5
|
specifier: ^7.22.5
|
||||||
version: 7.22.5(@babel/core@7.22.20)
|
version: 7.22.5(@babel/core@7.22.20)
|
||||||
'@vue/compiler-sfc':
|
'@vue/compiler-sfc':
|
||||||
specifier: link:/Users/kevin/Developer/open-source/vue/vue-core/packages/compiler-sfc
|
specifier: ^3.3.4
|
||||||
version: link:../../../vue-core/packages/compiler-sfc
|
version: 3.3.4
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/core':
|
'@babel/core':
|
||||||
specifier: ^7.22.11
|
specifier: ^7.22.11
|
||||||
|
Loading…
Reference in New Issue
Block a user