Transpile to ES modules with Babel

While I was working on Navigo an issue popped out. 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).


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog

While I was working on Navigo an issue popped out. 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).


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog


Print Share Comment Cite Upload Translate Updates
APA

Krasimir Tsonev - blog | Sciencx (2021-02-07T21:52:56+00:00) Transpile to ES modules with Babel. Retrieved from https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/

MLA
" » Transpile to ES modules with Babel." Krasimir Tsonev - blog | Sciencx - Sunday February 7, 2021, https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/
HARVARD
Krasimir Tsonev - blog | Sciencx Sunday February 7, 2021 » Transpile to ES modules with Babel., viewed ,<https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/>
VANCOUVER
Krasimir Tsonev - blog | Sciencx - » Transpile to ES modules with Babel. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/
CHICAGO
" » Transpile to ES modules with Babel." Krasimir Tsonev - blog | Sciencx - Accessed . https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/
IEEE
" » Transpile to ES modules with Babel." Krasimir Tsonev - blog | Sciencx [Online]. Available: https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/. [Accessed: ]
rf:citation
» Transpile to ES modules with Babel | Krasimir Tsonev - blog | Sciencx | https://www.scien.cx/2021/02/07/transpile-to-es-modules-with-babel/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.