Skip to content

Commit

Permalink
fix: types incorrectly set-up in pkg.exports
Browse files Browse the repository at this point in the history
Fixes `pkg.exports` missing types for bare module specifiers (i.e. imports from `yet-another-color-picker`).

Adds missing entry for type definition file (can now be imported `yet-another-color-picker/types/index.d.ts` without TypeScript complaining).
  • Loading branch information
kleinfreund committed May 18, 2023
1 parent 1c5f4a3 commit f4833bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
],
"type": "module",
"exports": {
".": "./dist/ColorPicker.js",
"./dist/ColorPicker.css": "./dist/ColorPicker.css"
".": {
"types": "./types/index.d.ts",
"default": "./dist/ColorPicker.js"
},
"./dist/ColorPicker.css": "./dist/ColorPicker.css",
"./types/index.d.ts": "./types/index.d.ts"
},
"main": "./dist/ColorPicker.js",
"module": "./dist/ColorPicker.js",
Expand Down

0 comments on commit f4833bb

Please sign in to comment.