GraphQL always gets bundled (webpack)
See original GitHub issueThese are the only imports I have of Amplify, and I’m not using any of the GraphQL features. However, when using Webpack Bundle Analyzer, I see that almost 150kb of my project hundle is the GraphQL module that Amplify imports. I did try to tell Webpack to exclude the module from my build, but then Amplify fails to load because it explicitly imports GraphQL in one of its files (there was no stack trace given). Again, below are the only imports my project uses:
import Auth from '@aws-amplify/auth';
import { Hub, ConsoleLogger } from '@aws-amplify/core';
aws-amplify 1.1.4 aws-amplify-react 2.0.5
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Webpack'ing your GraphQL Documents
Since it is a Webpack loader, it has to turn each .graphql into a bit of Javascript code that Webpack can place into...
Read more >PersistGraphQL Webpack Plugin with Hot Code Reload ...
PersistGraphQL Webpack Plugin is a tool to gather GraphQL queries from source code of GraphQL projects and inject them into the build bundles....
Read more >How to build an Apollo GraphQL server with TypeScript and ...
Webpack is a JavaScript module bundler. It is also capable of transforming, bundling, or packaging just about any resource or asset.
Read more >Nodejs error after webpacking the bundle - Stack Overflow
graphql /schema"; import * as authenticator from ". ... the bundle using webpack and move to production, I'm getting the following error:
Read more >A Guide to Managing Webpack Dependencies - Toptal
The Webpack module bundler processes JavaScript code and all static ... However, configuring Webpack and its dependencies can be cumbersome and not always...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aws-amplify/api
always required bundling graphql as well. It would be nice if theaws4
signature process for REST endpoints (e.g. Lambda) could be loaded individually.Will this be resolve at some point? If you are just using Amplify for Auth in a React app then there is an excessive amount of additional stuff that gets included.