krasimir / ktcom-comments

Comments made on https://krasimirtsonev.com/blog
MIT License
0 stars 0 forks source link

Transpile to ESM with babel #662

Open krasimir opened 3 years ago

krasimir commented 3 years ago

Article 👉 https://krasimirtsonev.com/blog/article/transpile-to-esm-with-babel


While I was working on Navigo an issue popped up. It was about using the library in the context of Web Dev Server where we have everything in TypeScript. And something was not ok with Navigo. The npm package wasn't exported properly and we were keep getting a does not provide an export named 'default' error. It turned out the problem is that Navigo is not exported properly as ES module (also known as ESM). ... continue reading