Skip to content

Commit 4885b3e

Browse files
committed
refactor
1 parent 5dcfdd8 commit 4885b3e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

packages/babel-plugin-resolve-type/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"main": "dist/index.js",
99
"module": "dist/index.mjs",
1010
"types": "dist/index.d.ts",
11+
"exports": {
12+
".": {
13+
"import": "./dist/index.mjs",
14+
"require": "./dist/index.js"
15+
},
16+
"./package.json": "./package.json"
17+
},
1118
"repository": {
1219
"type": "git",
1320
"url": "git+https://github.com/vuejs/babel-plugin-jsx"
@@ -30,7 +37,7 @@
3037
"@babel/helper-module-imports": "^7.22.5",
3138
"@babel/parser": "^7.22.11",
3239
"@babel/plugin-syntax-typescript": "^7.22.5",
33-
"@vue/compiler-sfc": "link:/Users/kevin/Developer/open-source/vue/vue-core/packages/compiler-sfc"
40+
"@vue/compiler-sfc": "^3.3.4"
3441
},
3542
"devDependencies": {
3643
"@babel/core": "^7.22.11",

packages/babel-plugin-resolve-type/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default ({
3838
const props = comp.params[0];
3939
if (!props) return;
4040

41-
if (props.type === 'AssignmentPattern' && 'typeAnnotation' in props.left) {
41+
if (props.type === 'AssignmentPattern') {
4242
ctx!.propsTypeDecl = getTypeAnnotation(props.left);
4343
ctx!.propsRuntimeDefaults = props.right;
4444
} else {

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)