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

Provide esm version #257

Open
tobiasdiez opened this issue Mar 4, 2023 · 5 comments · May be fixed by #259
Open

Provide esm version #257

tobiasdiez opened this issue Mar 4, 2023 · 5 comments · May be fixed by #259

Comments

@tobiasdiez
Copy link

With more and more build tools (vite, nuxt, etc) going towards an esm-first build, it would be nice if a proper esm interface could be provided, i.e. transpile and distribute esm version, including correct export declaration in package.json.

@trevor-scheer trevor-scheer linked a pull request Mar 4, 2023 that will close this issue
@trevor-scheer
Copy link
Member

@tobiasdiez yeah, I think we knew this should happen eventually - thanks for the nudge. Got a PR open for it. I'll test out the builds next week, should be able to get it merged and published in a number of days. If you don't mind trying out the builds that would be great!

@floydspace
Copy link

Hey @tobiasdiez I'd like to nudge again. this fix would cut 100kb from my app bundle size. Thank you

@trevor-scheer
Copy link
Member

@floydspace the changes on the linked PR take after Apollo Server's approach, which has been updated once already and is awaiting another fix from a contributor who has offered to implement the change. I'd like to wait until that change lands, then I can follow up with an equivalent update on #259.

@d3c0d3dpt
Copy link

d3c0d3dpt commented Nov 16, 2023

Hey @trevor-scheer, I see that the other fix is not really moving for quite a while. Any chance we can get the ball running on this one?

@trevor-scheer
Copy link
Member

My #259 PR follows Apollo Server's pattern. I don't think Apollo Server has it right currently, so I'm reluctant to adopt the same pattern until we figure out the right one. I unfortunately haven't had time to investigate this and I'm not sure when that might happen.
Ref: apollographql/apollo-server#7625

If anyone feels motivated to solve the TS + CJS/ESM dual-package problem in a monorepo I would love to see that. The results of my limited investigation up to this point are documented in the linked issue. There's potentially some tooling that could help us there if we bend it to our will but I haven't tried anything out yet.

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.

4 participants