aragon / connect

(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
https://aragon.org/connect
GNU Lesser General Public License v3.0
145 stars 53 forks source link

Track the final bundle size #49

Open bpierre opened 4 years ago

bpierre commented 4 years ago

We should keep track of the final bundle size when the required modules are being imported in a web app.

We could have the following:

We could try to do this using https://bundlewatch.io/

eliobricenov commented 3 years ago

Hey @bpierre, just to make sure:

One bundle with @aragon/connect + app connector, for every core app.

That would be @aragon/connect + @aragon/connect-finance + @aragon/connect-tokens + @aragon/connect-voting right?

One bundle with @aragon/connect + all the core app connectors.

And this @aragon/connect + @aragon/connect-react + @aragon/connect-core + @aragon/connect-ethereum + @aragon/connect-thegraph?

bpierre commented 3 years ago

That would be @aragon/connect + @aragon/connect-finance + @aragon/connect-tokens + @aragon/connect-voting right?

No it would be separate bundles, one per app connector, to test realistic final bundle sizes independently:

One bundle with @aragon/connect + all the core app connectors.

And this @aragon/connect + @aragon/connect-react + @aragon/connect-core + @aragon/connect-ethereum + @aragon/connect-thegraph?

It would be a single app using most of the app connectors, to keep track of a bundle size when using a lot of app connectors at once.

For example, the bundle could contain the following:

eliobricenov commented 3 years ago

Ok, that makes sense, thanks @bpierre

eliobricenov commented 3 years ago

I did some research and https://bundlewatch.io/ would be useful to track single file sizes (e.g React's final .js files) but in order to check different combinations of packages, we'd need to track directory sizes instead.

Maybe we can use their NodeJS API to implement a solution, either way, I can do further research on other options as well.

That being said, I think that given that this is an enhancement, bug's issues such as https://github.com/aragon/aragon-cli/issues/1082 have a higher priority and should be tackled first.

What do you think? @nivida