Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Typescript with nodenext resolution ignores the "typings" property completely when "exports" is specified, which causes typescript to complain that it can't find any type definitions for this package.
microsoft/TypeScript#49160 (comment)
This should work fine on both v3 and v4, since both have the same issue with typescript and the exports object.
Here is the diff that solved my problem:
diff --git a/node_modules/vuex/package.json b/node_modules/vuex/package.json
index e8a851e..4cd1fce 100644
--- a/node_modules/vuex/package.json
+++ b/node_modules/vuex/package.json
@@ -7,7 +7,8 @@
".": {
"module": "./dist/vuex.esm.js",
"require": "./dist/vuex.common.js",
- "import": "./dist/vuex.mjs"
+ "import": "./dist/vuex.mjs",
+ "types": "./types/index.d.ts"
},
"./": "./"
},
This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels