create-preact-app icon indicating copy to clipboard operation
create-preact-app copied to clipboard

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

Open scazzy opened this issue 6 years ago • 1 comments

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)

scazzy avatar May 17 '18 04:05 scazzy

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

vspedr avatar Jun 28 '18 18:06 vspedr