talkjs / country-flag-emoji-polyfill

Add country flag emojis to Chromium-based browsers on Windows
Other
122 stars 8 forks source link

Change type export in package.json #12

Closed RndUsername closed 6 months ago

RndUsername commented 6 months ago

The module doesn't compile in Typescript because the type export is not set correctly.

RndUsername commented 6 months ago

To be honest I don't really know why but if I use it as is, I get the build error Could not find a declaration file for module 'country-flag-emoji-polyfill'. If you pull my project and run npm run build you can see that for yourself. I hope this helps.

Could we maybe put "types": "./dist/index.d.ts" into both places? Leave it like before and additionally put into "exports"?

eteeselink commented 6 months ago

Does this PR fix it for you? https://github.com/talkjs/country-flag-emoji-polyfill/pull/13

RndUsername commented 6 months ago

I could not get my PR installed locally but if do the change by hand, it works.

RndUsername commented 6 months ago

Ah, sorry I missunderstud, I need to check that

RndUsername commented 6 months ago

Yes! It works like a charm!

eteeselink commented 6 months ago

Fixed in #13 and published as 0.1.7. Thanks for your help with reporting & testing this!