builder
builder copied to clipboard
High bundle - Builder io React
Workaround to solve the high bundle size of the builder ?! it is impacting directly on js bundle size of the application
Describe the bug
A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
-
install @builder.io/react
import { builder, BuilderComponent } from '@builder.io/react' import '@builder.io/widgets' 4. check the size of the bundle = 273k + 161k 5.
Expected behavior A clear and concise description of what you expected to happen. has a better bundle size
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
hey @dkrefta - we have a v2 of our react SDK coming very soon that is drastically smaller, @samijaber can update here with more
@steve8708 thanks very much for the update
Our v2 React SDK is now out in Beta: https://github.com/BuilderIO/builder/blob/main/packages/sdks/output/react/README.md
example of how to use it: https://github.com/BuilderIO/builder/tree/main/examples/react-v2
@samijaber safe for production?
I tried out the beta today, but was unable to get it to work.
Using it in production is all about your risk tolerance, @dkrefta.
Hope this is helpful.
@charkour please raise any issues you encounter with the @builder.io/sdk-react
beta SDK, and tag me! Would love to unblock you
@samijaber safe for production?
@dkrefta it is still in beta, and does not have every single feature that the stable v1 React SDK has. But it should be able to handle a vast majority of Builder features and designs without issues. 🙂
@samijaber, I was able to get the SDK to work. It simply doesn't work with server-side rendering. I've made an issue here: #1217. Thank you for the help!
I appreciate the steps forward your team is making.
@samijaber exactly, it's always a risk to use in production any beta release, but I will do some tests and see what we got of improvements by the builder io, thanks very much
We are still in the process of fully documenting our gen2 React SDK, but it is worth noting that it is now in v1!
https://github.com/BuilderIO/builder/blob/main/packages/sdks/output/react/CHANGELOG.md
its total bundle size is 25kb, with zero dependencies:
- https://bundlejs.com/?q=%40builder.io%2Fsdk-react
- https://bundlephobia.com/package/@builder.io/[email protected]
I will mark this issue as closed. If you have any problems with the gen2 SDK, please let the Builder team know using support channels/forum and we will make sure they are resolved