@builder.io/sdk size

Hello, according to your GitHub page,
the size of the sdk for react (minzipped) is 3.21kb

But when I tried installing and using webpack bundle analyzer, it’s giving a different number (far bigger). We are using

@builder.io/react”: “^2.0.16”,
@builder.io/sdk”: “^1.1.34”,
@builder.io/widgets”: “^1.2.23”,


Thank you in advance!

I was wondering about this as well, specifically for the @builder.io/react package, as it is currently the biggest package in my main _app bundle (using NextJS) and is definitely affecting initial load times. Do I need to do better tree-shaking?

Hi @marthayaputra & @chtbks-jason,

Welcome to the builder.io forum.

The minizipped size mentioned on our GitHub page is the actual code size compressed and an app’s bundle size is the amount of JavaScript a user will have to download to load your app.

Since you used webpack-bundle-analyser, I am assuming your build process utilises webpack. So your options are the following:

You can use Webpack’s Tree Shaking Guide.

In general, a large part of bundle size reduction is dead code elimination.

Once you have done that, you might want to follow React’s Code Splitting guide to ensure that the initial load is faster.

Hi @chtbks-jason, @marthayaputra,

Just wanted to update you that we will be updating our GitHub page with the latest bundle size of different SDKs, we do appreciate you reporting this to us. Thank you!

Hi, @manish-sharma ,
thanks for your reply, sorry I don’t understand your point, what I wanted to point out was the size of the @builder-io chunk itself is far bigger from the documentation (part of what attract us to use it in the first place), it’s clearly highlighted in the tooltip there all the sizes for builder.io bundle ( including gzipped) is not what was written down in the github page. Shouldn’t the bundle size of @builder.io module from bundle analyzer close to the one written in the github?

Hi @marthayaputra,

Yes, you are right. Thanks for highlighting this to us. Our GitHub page is getting updated with the latest bundle size.