Closed demfabris closed 3 years ago
Okay so i managed to port the source code into my application and saved about 100kb of bundle size. If anyone has the same issue feel free to contact me.
Not too sure about why it's pulled in styled-components
. I added react-dom/server
to externals which has reduced dist/styled-components.js
to 5.9k.
I'm making a embedabble widget with Preact + Styled components and ShadowDOM is a must for me But after implementing it i pretty much doubled my bundle size due to some required nodejs libs.
Here's a bundle analyzer ss:
Apparently react-shadow is pulling again a 78kb styled-components package, is that expected? Seems like it doesn't recognize that i already have styled-components installed...
Also, as you can see, readable-stream and buffer are really heavy libs to pack into a tiny preact chatbot widget. Can you guys give me some guidance on reducing bundle size with react-shadow?