-
Notifications
You must be signed in to change notification settings - Fork 113
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
Ship esm version #49
Comments
Thanks for the report. I'll need to dig into how to best do this. Might have to create a v2 and force node 12 instead of >=8. From my quick research it seems it can be quite a pain to manage both a cjs and esm version of a library. |
Thanks for looking into this. Maintaining cjs + esm is indeed sadly not easy. The nuxt team developed https://github.com/unjs/unbuild that aims to help with this (I have no experience with this tool, but maybe its helpful). |
As a quick fix so you can continue to use the viewer...you can turn it off in the Tailwind Nuxt Module config and then use it directly via |
Is there still a need to support both cjs and esm? Maybe we can move forward with esm only. |
@rogden would you accept PR(s) to make this compatible with ESM tailwind configs? I'd be willing to help with that. Additionally, Node 18 is the lowest node version that isn't end of life, so a v2 release could include dropping unsupported node versions as well as a move to ESM compatibility. |
@bkjohnson Absolutely! |
ESM support added in v2. Closing this out for now. |
If I'm not wrong, this issue is more about the library moving to ESM syntax internally so possibly the surrounding ecosystem can also take advantage and benefit from it? |
Supporting esm config files is nice, but I've opened this issue indeed with the wish to have a esm-version of the whole config-viewer package. Could you please reopen the issue @rogden? |
#92 seems to be fresher issue |
Currently, in the distributed/published version only commonjs is used. It would be nice if they would be also published as esm. This is needed for nuxt3/bridge, see nuxt-modules/tailwindcss#390 and https://v3.nuxtjs.org/concepts/esm#library-author-guide.
The text was updated successfully, but these errors were encountered: