jquense / react-dom-lite

Tiny dom implementation using react-reconciler
246 stars 21 forks source link

Use Rollup + GCC #16

Closed gaearon closed 6 years ago

gaearon commented 6 years ago

In our experience they provide the best bundle size. Let's use them here too?

jquense commented 6 years ago

I've been thinking about this, and the best way forward on that. (at the very least so we can start seeing the size of this thing). It seems like rollup is the best tool for the job, but I don't have any experience with it so we need to poke around at what react is doing there.

I'm a interested if consuming an already rolled-up bundle (react-reconciler) is going to be as efficient... Maybe a good argument for react exposing an esm build?

ManasJayanth commented 6 years ago

Maybe a good argument for react exposing an esm build?

👍

It seems like rollup is the best tool for the job, but I don't have any experience with it so we need to poke around at what react is doing there.

I used it for my repo and have poked around React's build scripts too. I can help with you with this @jquense :)

gaearon commented 6 years ago

I'm a interested if consuming an already rolled-up bundle (react-reconciler) is going to be as efficient... Maybe a good argument for react exposing an esm build?

I don't expect that to make a difference—in any case the export of RR is a single function.

I'm mostly suggesting Rollup to eliminate any intermediate function scopes inside this library's own modules.