Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is meant as a discussion for a future major version of Apollo Client. Right now the published package is using TypeScript's downleveling emit directives to compile to ES5. This *irreversibly* bloats the package with cruft that most users won't need. Additionally, it affects performance since native ES features are simulated using clunky workarounds. This is especially noticeable with async/await where any async functions compile into a state machine. This also affects nullish coalescing (`??`), optional chaining (`?.`), arrow functions, and a lot more. My suggestion is to publish this package using the code as it was written and allow the user's bundler to perform transpilation and minification as configured. This reduces the size of `apollo-client.min.cjs` from 120kb to 104kb which is pretty good for a one-line change.
- Loading branch information