Codegen component inflates bundle size when using its args slot

Hi Guys, I am looking for some guidance on the following. I have a codgen React/Gatsby project. When I use the “args” to set the contents of a slot to any plasmic component the bundle size jumps from 6KB to 400KB.

So with the line comment out above. the size of the JS bundle is 6KB

With the line in place, putting a component into the slot target.

image.png

it looks like the size increase is from the _3ContentSectionHeadingDescBtns2XImg component now being pulled in as a dependency for your final bundle?

Yeah the thing is that component is already part of the page regardless.

So the default content already contains the same component. Its just a plasmic component wrapper.

can you link me to your project?

Interesting, maybe I just found the answer.

After the build it does seem to get shaken out

Sorry I should have said the above observation was during “npm run develop” in gatsby

ah! ok cool :sunglasses:

So the gatsby build process did clean it all up.