Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esm compatibility #5

Closed
timbo86 opened this issue Sep 19, 2022 · 4 comments · Fixed by #7
Closed

Add esm compatibility #5

timbo86 opened this issue Sep 19, 2022 · 4 comments · Fixed by #7

Comments

@timbo86
Copy link

timbo86 commented Sep 19, 2022

When using vite, there is a workaround needed for commonjs. To avoid this, please add esm script modules compatibility.

It should be possible to have an hybrid cjs and esm module.

@DanielJDufour
Copy link
Owner

Good catch!

@DanielJDufour
Copy link
Owner

I published a new version as a release candidate, which I believe provides the esm support you require. Could you try to install xml-utils as npm install xml-utils@next (or yarn add or pnpm install`) and let me know if it works now without the workaround. Thank you!

@DanielJDufour
Copy link
Owner

DanielJDufour commented Feb 26, 2024

@IvanSanchez , I merged you PR. Thank you so much! I then published a new patch release candidate, which you can install with npm install xml-utils@next. Would you be able to try that out and confirm that it works for you? I'll also need to confirm that it works with geotiff.js (which shouldn't take long).

Thank you!

@IvanSanchez
Copy link
Contributor

@DanielJDufour I just run npm install xml-utils@next, which pulled version 1.7.1-0. After a tiny bit of testing, it works as expected. 👍

I'm preparing a more complex PR for geotiff.js for full in-browser ESM compatibility - involving 👿 dynamic imports 👿.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants