-
Notifications
You must be signed in to change notification settings - Fork 67
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
Provide ESM bundle #185
Comments
Hi, can you give an example of tooling that is not compatible with Moo today? |
I imagine "not-really-compatible" here means "it works completely fine and my packaging script can't exclude |
Yeah, without ESM bundle it cannot be tree-shaken... but looking at the source, I'm not sure how much there could be shaken away anyway..? |
ESM would allow this, which is a style I use all the time:
|
I brought it into a Remix app via gqlmin and I am getting the following error:
When I add |
Can you explain in detail how you did it please ? Because when I add the code above to my My
|
Yeah, here's the relevant bit from my vite.config.ts: export default defineConfig({
ssr: {
optimizeDeps: {
include: [
'moo', // Used by gqlmin
],
},
},
optimizeDeps: {
include: [
'moo', // Used by gqlmin
],
}
}); This is for a Remix / Hydrogen app |
Thank you for your answer but it did not work for me, I still got the same error. At the end, I have just changed the parent library, |
Most popular packages have moved on to ESM-only or dual export packages.
Moo is still using the old-fashioned UMD format, being not-really-compatible with modern tooling.
The text was updated successfully, but these errors were encountered: