Bundle size increase using gatsby-browser.js vs layout #30749
Unanswered
wildpow
asked this question in
Umbrella Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed a bundle size increase of 4.25 Kb by adding a provider to
gatsby-browser.js
vs. adding the provider tolayout.js
. I noticedcommons-2e60b884bb29ca9d80b0.js
when using the layout method. As I understand it, Gatsby will bundle common packages if they are present in enough pages but, this optimization does not seem to happen when using the browser API. If this is the case per provider, then it would add up as your project grew. Any idea why this is?gatsby.browser.js
layout.js
Beta Was this translation helpful? Give feedback.
All reactions