manuelmhtr / countries-and-timezones

Minimalistic library to work with countries and timezones data
MIT License
224 stars 67 forks source link

ESM Build is not published to NPM #34

Closed Jarrku closed 3 years ago

Jarrku commented 3 years ago

The files array does not publish the ESM folder, causing errors when using v3 with vite. Also the exports config needs the . indentifier.

manuelmhtr commented 3 years ago

Hi @Jarrku, as I see in documentation there is no need for the . identifier. However, the esm is necessary. Please remove the . change and I'll be happy to merge.

manuelmhtr commented 3 years ago

Hi @Jarrku, I included the change in version 3.1.0 and mentioned your contribution in changelog.

Jarrku commented 3 years ago

I think you linked to something incorrect (it's a YT link :) )

When trying it out locally, I kept getting errors with the current exports syntax.

Vite recommends the following config for libs:

https://vitejs.dev/guide/build.html#library-mode image

Looking at node documentation, all the examples are also using "." identifier at the start.