This commit is contained in:
三咲智子 Kevin Deng 2023-08-28 00:46:42 +08:00
parent 5dcfdd8833
commit 4885b3e7c7
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
3 changed files with 11 additions and 4 deletions

View File

@ -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",

View File

@ -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 {

View File

@ -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