dotansimha / dotansimha/graphql-code-generator
Explore reducing package size
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
**Is your feature request related to a problem? Please describe.**
An npm install of @graphql-codegen/typescript is currently 39MB and includes pretty much the kitchen sink (including babel and core-js)
This is almost solely due to:
1. @graphql-codegen/typescript (39MB) which needs:
2. @graphql-codegen/visitor-plugin-common (39MB) which needs:
3. @graphql-tools/relay-operation-optimizer (36MB) which needs:
4. relay-compiler (33MB) which needs a whole bunch of stuff (103 packages at least)
Given that relay is a very niche need for most graphql typescript users, it seems unfortunate that its inclusion results in the bulk of the package size
**Describe the solution you'd like**
Remove relay-compiler and/or relay-operation-optimizer from the default install and make it optional
**Additional context**
39MB may not sound like too much, but in a project with dozens of deps, it stands out as one of the biggest offenders for a considerably small utility. It also increases the surface area for security issues and (annoying) package update notifications.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.