Closed tniezurawski closed 1 year ago
Okay, now I understand. The issue can be closed. I was bundling two versions of @apollo/client
:
After adding a resolution to package.json
, the library is properly deduped and everything seems to be still working fine 👍
Sorry for the noise!
We use the latest
ember-apollo-client
with embroider, Ember4.11.0
andember-auto-import@2.6.1
(pretty much the latest versions at the time of writting). After upgrading@apollo/client
from3.5.10
to3.6.0
(one version up) our bundle size exploded.According to Bundlephobia, the difference between these versions is minimal. Only 0.8KB gzipped:
But somehow our main bundle went up a lot. After investigation, I realized that something wrong is going on in
ember-apollo-client
. Before the upgrade, it was just a thin layer with a 6.14KB size (gzipped):After the upgrade it's 97.45KB (gzipped):
I see it's packaging 63-65 modules extra:
I guess it's concatenating the whole
@apollo/client
instead of being just a thin layer 🤔 Maybe even 3 times! I seeember-apollo-client
imports from@apollo/client/core
but why such a difference between versions? (I don't see anything related in 3.6.0's changelog)Does anyone have any pointers for me? Any idea I can try?