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",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/babel-plugin-jsx"
|
||||
@ -30,7 +37,7 @@
|
||||
"@babel/helper-module-imports": "^7.22.5",
|
||||
"@babel/parser": "^7.22.11",
|
||||
"@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": {
|
||||
"@babel/core": "^7.22.11",
|
||||
|
@ -38,7 +38,7 @@ export default ({
|
||||
const props = comp.params[0];
|
||||
if (!props) return;
|
||||
|
||||
if (props.type === 'AssignmentPattern' && 'typeAnnotation' in props.left) {
|
||||
if (props.type === 'AssignmentPattern') {
|
||||
ctx!.propsTypeDecl = getTypeAnnotation(props.left);
|
||||
ctx!.propsRuntimeDefaults = props.right;
|
||||
} else {
|
||||
|
@ -129,8 +129,8 @@ importers:
|
||||
specifier: ^7.22.5
|
||||
version: 7.22.5(@babel/core@7.22.20)
|
||||
'@vue/compiler-sfc':
|
||||
specifier: link:/Users/kevin/Developer/open-source/vue/vue-core/packages/compiler-sfc
|
||||
version: link:../../../vue-core/packages/compiler-sfc
|
||||
specifier: ^3.3.4
|
||||
version: 3.3.4
|
||||
devDependencies:
|
||||
'@babel/core':
|
||||
specifier: ^7.22.11
|
||||
|
Loading…
Reference in New Issue
Block a user