Skip to content

Conversation

@Austio
Copy link
Contributor

@Austio Austio commented Aug 7, 2019

This PR reduces the size of the library by between 60-65% across esm/min/umd builds

This PR builds on top of #722 and extracts Apollo components into an includable plugin. I don't think that we require people who are not including these components to include in the bundle.

Library Before After WithExternals After Removing Apollo Components
esm 133k 57k 48k
min 52k 26k 21k
umd 142k 61k 51k
# Current Build
drwxrwxr-x  2 talos talos   4096 Jul  5 11:50 .
drwxrwxr-x 16 talos talos   4096 Aug  7 10:26 ..
-rw-rw-r--  1 talos talos 133190 Aug  7 10:27 vue-apollo.esm.js
-rw-rw-r--  1 talos talos  52935 Aug  7 10:26 vue-apollo.min.js
-rw-rw-r--  1 talos talos 142186 Aug  7 10:27 vue-apollo.umd.js

# With externals
drwxrwxr-x  2 talos talos  4096 Jul  5 11:50 .
drwxrwxr-x 16 talos talos  4096 Aug  7 10:26 ..
-rw-rw-r--  1 talos talos 57047 Aug  7 10:28 vue-apollo.esm.js
-rw-rw-r--  1 talos talos 26922 Aug  7 10:28 vue-apollo.min.js
-rw-rw-r--  1 talos talos 61127 Aug  7 10:28 vue-apollo.umd.js

# With removing apollo
drwxrwxr-x  2 talos talos  4096 Jul  5 11:50 .
drwxrwxr-x 16 talos talos  4096 Aug  7 10:26 ..
-rw-rw-r--  1 talos talos 48084 Aug  7 11:03 vue-apollo.esm.js
-rw-rw-r--  1 talos talos 21970 Aug  7 11:03 vue-apollo.min.js
-rw-rw-r--  1 talos talos 51291 Aug  7 11:03 vue-apollo.umd.js

@Austio Austio changed the title Externalize apollo components (build) Externalize apollo components Aug 7, 2019
@Akryum
Copy link
Member

Akryum commented Sep 12, 2019

Hi, I have plan to tackle this issue in vue-apollo 4, albeit a bit differently.

@Austio
Copy link
Contributor Author

Austio commented Sep 13, 2019

@Akryum awesome, any reason to not do now? Makes a biggish difference in the bundle size.

@Akryum
Copy link
Member

Akryum commented Sep 13, 2019

I'd rather not have such a change in the rc, the priority being stabilization and release of 3.0.0

@Austio Austio closed this Apr 7, 2020
@Austio Austio deleted the externalize-apollo-components branch April 7, 2020 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants