just-boris / create-preact-app

Create Preact apps with no build configuration.
MIT License
95 stars 8 forks source link

Note an issue/bug: What were byte/performance gains using Preact over React? #37

Open scazzy opened 6 years ago

scazzy commented 6 years ago

Is this a bug report?

No

Query

I use CRA, and having built a react + webpack app from scratch earlier, the CRA adds quite some extra bytes along in the final bundles. Want to understand numbers of the CPA, how much difference in bytes and performance have you benchmarked compared to CRA.

Also if the difference is significant, probably you can add it in the README for others to see another reason to use Preact over React. (I don't bias in either, but I prefer to see a minimal bundle size at the end when using boilerplates)

vspedr commented 6 years ago

Hi @scazzy, I just did a naive check on the bundle sizes of a fresh create-react-app project and a create-preact-app one.

create-react-app (just create project and build):

File sizes after gzip:

  36.94 KB  build/static/js/main.a0b7d8d3.js
  299 B     build/static/css/main.c17080f1.css

create-preact-app (after uninstalling react, installing preact then building):

File sizes after gzip:

  8.92 KB  build/static/js/main.ce967cb9.js
  299 B    build/static/css/main.c17080f1.css