-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Investigate ESM support #6243
Comments
https://github.com/benduran/package-bundler might be nice — a new tool inspired by how |
Note that as part of this we would probably want a separate entry point for |
Keeping it separate mostly just means we have to worry about version skew. It doesn't let us avoid the protobufjs dependency (it was just transitive). Other packages that may need these types (like `@apollo/gateway`) will have a peer dependency on `@apollo/server` anyway. Note that this package consists of .js and .d.ts files that are not generated from .ts files, so they exist outside of `src`. We ensure they end up in the published package via a change to `.npmignore`. As before, the only code that can import the protobuf code should be tests, `import type`s, or code under `src/plugin` that is only evaluated if the plugin is actually used. Also fixes missing dependencies on cors and body-parser needed for the standalone server. (As part of #6243 we may make sure that these are only needed if you actually import the standalone server directory.) Fixes #6510.
FYI: this seems like a duplicate of #5627 |
(It would also be nice if we could drop @alfaproject technically #5627 is "do a thing" and #6243 is "consider doing a thing as part of the AS4 work" though they are certainly related. |
I think I have this working at #6580 |
Apollo Server and friends are compiled for CJS. It would be nice to build for ESM as well.
Reference: https://community.apollographql.com/t/responsecacheplugin-is-not-a-function/2796/2
The text was updated successfully, but these errors were encountered: