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

Issues with ESM syntax #21

Open
axe312ger opened this issue Mar 27, 2023 · 7 comments
Open

Issues with ESM syntax #21

axe312ger opened this issue Mar 27, 2023 · 7 comments

Comments

@axe312ger
Copy link

axe312ger commented Mar 27, 2023

Hey there,

thanks for the quick reply in #20.

I also noticed that the ESM implementation here is outdated, its pretty annoying to get it working with Gatsby (and probably other frameworks that now use/support ESM)

Can you please remove the https://github.com/wix-incubator/kampos/blob/master/package.json#L7? This should already help.

Alternatively: https://rollupjs.org/introduction/#publishing-es-modules (I think you do that, but your RollUp is v2 and v3 is the current... maybe upgrade? :))

Thank you so much,
If you got zero time, I can also give it a try, but didn't do much yet with rollup 🙈

@ydaniv
Copy link
Collaborator

ydaniv commented Mar 27, 2023

@axe312ger yep, I'm actually on it now (:

@ydaniv
Copy link
Collaborator

ydaniv commented Mar 28, 2023

Hey @axe312ger , here's the WIP PR: #22
I couldn't remove type: module, Rollup keeps screaming at me if I do that. For some reason it keeps complaining of a mismatch between ES modules and Node trying to load CJS 🤷
But I did add a module entry here, maybe that will help. Can you check this somehow on your side?

@axe312ger
Copy link
Author

Yeah if you export it as ESM, you have to keep the type: module, so thats fine.

I'll have a look!

@ydaniv
Copy link
Collaborator

ydaniv commented Mar 28, 2023

I wonder whether it's ok to use the src index file as endpoint for ESM, or whether a single pre-built dist is also needed. 🤔

@axe312ger
Copy link
Author

axe312ger commented Mar 28, 2023 via email

@ydaniv
Copy link
Collaborator

ydaniv commented Apr 1, 2023

@axe312ger should be fixed with 16418e3.
I've published 0.8.0, please try it out and update here.
Thanks!

@ydaniv
Copy link
Collaborator

ydaniv commented Apr 13, 2023

@axe312ger did it work for you?

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

No branches or pull requests

2 participants