Skip to content

Preact bundle larger than React #1289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luca-aurelia opened this issue Jan 13, 2019 · 3 comments
Closed

Preact bundle larger than React #1289

luca-aurelia opened this issue Jan 13, 2019 · 3 comments

Comments

@luca-aurelia
Copy link

Hi folks!

Thanks for all your amazing hard work on Preact 🙏A couple of very high performance products I've launched would have been impossible without all the effort you've put in to building such a small, fast library. I know that making things small is often harder than making them big. (As Blaise Pascal once said, "I would have written a shorter letter, but I did not have the time.")

I just came across a data point and wanted to see what you all thought: In the past, one of Preact's many benefits was how much smaller it was than React. According to Bundlephobia, that's no longer the case:

Minified Minified + gzipped
React 16.7 5.9 kB 2.5 kB
Preact 8.4 8.9 kB 3.5 kB

Not sure what the implications are (if any), but wanted to hear your thoughts on the matter.

Cheers!
Thomas

@Panya
Copy link

Panya commented Jan 13, 2019

It's size without react-dom (in React case). Basically Preact is alternative to react + react-dom. So in React case you should sum their sizes (~33.5 KB vs 3.5 KB)

@marvinhagemeister
Copy link
Member

marvinhagemeister commented Jan 13, 2019

What @Panya said👍

The react package doesn't really do anything in its own and must be used with either react-dom, react-native or some other bindings together.

So yeah, 3.5kB is a lot smaller than 33.5kB 😉

@luca-aurelia
Copy link
Author

Figured I was missing something. Thanks for pointing that out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants