Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Improve build scripts to allow for tree-shaking #31

Open
gabrieljablonski opened this issue Nov 25, 2022 · 0 comments
Open

Improve build scripts to allow for tree-shaking #31

gabrieljablonski opened this issue Nov 25, 2022 · 0 comments

Comments

@gabrieljablonski
Copy link

The build process currently just bundles all of the code on a single index.js file, which is very inefficient when considering bundle-size. As an example, my application is about 1200kB (unzipped) in size, of which 500kB is from react-iconly.

I have very little knowledge about bundlers, so I have no idea what would be best way to go about doing this, but my educated guess is that using a different bundler (or maybe even just different options) would be enough.

My workaround was publishing a package with the whole source code (with some modifications made after my build process failed), and letting my bundler (my project is built with vite) do the dirty work.

After doing this, my bundle-size shrunk to about 800kB.

Hopefully something can be properly done about this in the near future.

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

No branches or pull requests

1 participant