You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've raised this issue before, but the situation has gotten significantly worse since then. Running npx cost-of-modules after an install of apollo-server-lambda shows an install footprint of 34MB, which is zipping down to about 9MB.
┌──────────────────────────┬──────────────┬────────┐
│ name │ children │ size │
├──────────────────────────┼──────────────┼────────┤
│ apollo-server-lambda │ 222 │ 34.38M │
The major offenders appear to be related to polyfill/backwards-compatability. Its not clear to me how necessary they are, or why they are so incredibly large.
Surprisingly the usual dead-weight suspect, @types, is at the bottom of this list. The polyfill libs are made up almost entirely of their own copies of es-abstract, a 3.1MB compatability layer. I don't know why each one has a seperate copy, it seems like they should have been flattened by npm.
The largest offender, core-js, is used by apollo-env. It's not clear to me how this happens: npm ls lists it as a direct dependencies, but it is not in the package.json as far as I can tell.
I'd like to discuss possible avenues for addressing the size of this package. I understand that some of these, like @types can be safely stripped from deployment artifacts, so perhaps this is also true of some of the above. If not I think its worth identifying why they are present and how they might be avoided.
The text was updated successfully, but these errors were encountered:
(Slightly off-topic, but you once mentioned in the previous thread that you could share your test harness. If that is easy for you to do, I'm interested. If not, no sweat. My immediate goal is doing cold-start testing on other graphql frameworks, although Apollo is one possibility for us so I might want to test that eventually.)
I've raised this issue before, but the situation has gotten significantly worse since then. Running
npx cost-of-modules
after an install ofapollo-server-lambda
shows an install footprint of 34MB, which is zipping down to about 9MB.The major offenders appear to be related to polyfill/backwards-compatability. Its not clear to me how necessary they are, or why they are so incredibly large.
Surprisingly the usual dead-weight suspect,
@types
, is at the bottom of this list. The polyfill libs are made up almost entirely of their own copies ofes-abstract
, a 3.1MB compatability layer. I don't know why each one has a seperate copy, it seems like they should have been flattened by npm.The largest offender,
core-js
, is used byapollo-env
. It's not clear to me how this happens:npm ls
lists it as a direct dependencies, but it is not in the package.json as far as I can tell.I'd like to discuss possible avenues for addressing the size of this package. I understand that some of these, like
@types
can be safely stripped from deployment artifacts, so perhaps this is also true of some of the above. If not I think its worth identifying why they are present and how they might be avoided.The text was updated successfully, but these errors were encountered: