kwhitley / itty-router

A little router.
MIT License
1.71k stars 77 forks source link

fix: Add types path to package.json exports #114

Closed jeevcat closed 2 years ago

jeevcat commented 2 years ago

In a ESM project using TypeScript, I am unable to import types correctly.

I have followed the suggestions recommended here, which have resolved the issue: https://stackoverflow.com/questions/72457791/typescript-packages-that-ship-with-mjs-and-d-ts-but-without-d-mts-how-to-i

ConnorBaker commented 2 years ago

I can second that this change fixed importing types for me (using VS Code with the Typescript extension).

kwhitley commented 2 years ago

Thanks for the fix @jeevcat (and @ConnorBaker for the confirmation)!! :)