Skip to content

Commit

Permalink
fix: add types to package.json exports (#2278)
Browse files Browse the repository at this point in the history
Needed for newer typescript with certain moduleResolution settings.

Found the explanation & solution here:
gxmari007/vite-plugin-eslint#60

& the docs for the option here:
https://nodejs.org/api/packages.html#packages_exports (with `types`
being defined here:
https://nodejs.org/api/packages.html#conditional-exports)

Co-authored-by: Manu [tennox] <[email protected]>
  • Loading branch information
tennox and tennox authored Nov 11, 2023
1 parent 168b43d commit 3ad45ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"main": "./dist/src/lib.cjs",
"exports": {
".": {
"types": "./dist/src/lib.d.ts",
"browser": "./src/lib.js",
"require": "./dist/src/lib.cjs",
"node": "./src/lib.js"
Expand Down

0 comments on commit 3ad45ab

Please sign in to comment.