From ab77cee9a93799c54b0e1943f461c7fab3e3c698 Mon Sep 17 00:00:00 2001 From: Blake Newman Date: Thu, 30 Mar 2023 14:30:24 +0100 Subject: [PATCH] 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. --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9fc45db9652..51249777353 100644 --- a/package.json +++ b/package.json @@ -17,20 +17,20 @@ "packages/compiler-sfc" ], "exports": { - ".": { + ".": {, + "types": "./types/index.d.ts", "import": { "node": "./dist/vue.runtime.mjs", "default": "./dist/vue.runtime.esm.js" }, - "require": "./dist/vue.runtime.common.js", - "types": "./types/index.d.ts" + "require": "./dist/vue.runtime.common.js" }, "./compiler-sfc": { "import": "./compiler-sfc/index.mjs", "require": "./compiler-sfc/index.js" }, "./dist/*": "./dist/*", - "./types/*": "./types/*", + "./types/*": "./types/*.d.ts", "./package.json": "./package.json" }, "sideEffects": false,