Skip to content

Commit ab77cee

Browse files
committed
fix: typescript resolution
Move 'types' to be first as per typescript requirements. In order for `vue/types/...` to correctly resolve without extension with module type 'bundler', 'nodenext' etc the wildcard types needs to specify `./types/*.d.ts`. Many downstream packages import `vue/types/vue` and `vue/types/options` for ambient module argumentation.
1 parent a9ca2d8 commit ab77cee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
"packages/compiler-sfc"
1818
],
1919
"exports": {
20-
".": {
20+
".": {,
21+
"types": "./types/index.d.ts",
2122
"import": {
2223
"node": "./dist/vue.runtime.mjs",
2324
"default": "./dist/vue.runtime.esm.js"
2425
},
25-
"require": "./dist/vue.runtime.common.js",
26-
"types": "./types/index.d.ts"
26+
"require": "./dist/vue.runtime.common.js"
2727
},
2828
"./compiler-sfc": {
2929
"import": "./compiler-sfc/index.mjs",
3030
"require": "./compiler-sfc/index.js"
3131
},
3232
"./dist/*": "./dist/*",
33-
"./types/*": "./types/*",
33+
"./types/*": "./types/*.d.ts",
3434
"./package.json": "./package.json"
3535
},
3636
"sideEffects": false,

0 commit comments

Comments
 (0)