-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I recently updated my tsconfig to use moduleResolution: NodeNext (which enables "exports" processing in package.json).
However, I am still producing CommonJS output using "module: NodeNext" in tsconfig with "type: commonjs".
This causes TypeScript to load the "require" branch in your exports, which has no typings:
"exports": {
".": {
"require": "./lib/sha256-uint8array.js",
"import": {
"types": "./types/sha256-uint8array.d.ts",
"default": "./dist/sha256-uint8array.mjs"
}
}
},
You should export the typings for both require&import clients as follows:
"exports": {
".": {
"types": "./types/sha256-uint8array.d.ts",
"require": "./lib/sha256-uint8array.js",
"import": "./dist/sha256-uint8array.mjs"
}
},
Metadata
Metadata
Assignees
Labels
No labels