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

Improve build scripts to allow for tree-shaking #31

@gabrieljablonski

Description

@gabrieljablonski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions