Skip to content

Commit

Permalink
Update package.json exports to include types
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)
  • Loading branch information
tennox committed Jun 15, 2023
1 parent 5346ebd commit 0de87da
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 0de87da

Please sign in to comment.