-
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
Simple Webpack Bundle throws error on run #4691
Comments
same issue here, anyone can help? |
The error message is coming from the
Out of curiosity, what is your particular use case for using a bundler like Webpack with server code instead of just running it unbundled? Apollo Server doesn't try and do anything to intentionally preclude you from using something like Webpack, but it's not a concern we try to tackle since there can (often) be less benefit to re-bundling in server environments. |
@abernix Not sure about Jonathan's use case, but I am using apollo-server-lambda and Webpack can make a big difference for cold starts (even when you're using Lambda Layers). I think I've run into this issue before. I'll see if I can get anywhere on a fix. |
fixed using this workaround #4637 |
Here's a reproduction for the team: https://github.com/thekevinbrown/graphqljs-instanceof-reproduction |
We've had several reports of webpack leading to multiple copies of If there's something about how Apollo Server is set up that makes webpack fall into a particular trap I'd be happy to fix that. But I think the best path forward would be to open an issue with webpack asking why there are multiple copies of If the webpack team is able to identify a particular problem with Apollo Server that leads to this, then I'd be happy to make changes to work around the issue. But delving deep into webpack details to understand why combining webpack with |
I have also encountered this issue in my Apollo Webpack Typescript project, I have discovered the following: The extensions order inside the Webpack configuration seems to have a major influence. This will produce the error:
This will not produce the error:
|
Hello 👋,
I have been attempting to bundle an express application with Webpack where GraphQL has been recently added but am failing miserably 😔
I have created a simple reproduction repository with what I believe to represent a bug, I have searched through the documentation and checked for anything missing but can't find much in the way of reference to bundling with Webpack
https://github.com/JonathanTurnock/graphql-webpack-error.
Essentially I am stuck with the following error when attempting to run the bundle, again this was easily re-producable bu tits probably just a webpack config issue? any help would be massively appreciated 🙏
The text was updated successfully, but these errors were encountered: