Closed harrytran998 closed 1 year ago
@harrytran998 Unfortunately, this doesn't seem to be something I can fix. It seems due to the high number of packages and the even higher number of network requests, browsers are basically giving up. I'll try to optimize the fetch process but I'm not sure I can actually fix this problem.
A possible solution may be to pre-bundle Material UI, and then use it in your library, esbuild will automatically treeshake the unused parts of Material UI. Material UI as a set of 8K+ modules is too much for browsers to handle.
After a bit of research I've determined I can't fix this, at least not while bundlejs is running in a browser. I'll look into other alternative solutions to fix this.
Thanks for your quick response. I think your solution is valid for now(call HTTP in browser). So I will try to pre-bundle MUI. But if you find something interesting alternative solutions, pls let's me know 😆 🙏.
@harrytran998 It's now fixed, give it a try https://bundlejs.com/?q=@onemind/ui&bundle
Please let me know if you run into this problem again
Thanks for your work on this 😆 I checked it and everything ok! How do you handle this without call HTTP like before?
I made the package fetching algorithm more specific than before, allowing it to avoid fetching packages that could just be ignored or treeshaken away
thanks for your hard work <3
Hi @bundlejs, thanks for your great tool. Today I checked my small UI library - wrap of Material UI --> But I have the error like the image below. I hope you can check that!
Link: https://bundlejs.com/?q=%40onemind%2Fui