• alokir@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Configuring your bundler properly has to be done once per app, and it can significantly cut down on your app’s size.

    People expect to see apps, not web pages, but we can be smart about it. Tree shaking has been around for years now, if you build your app properly your bundle will only include the pieces of code that actually gets referenced, e.g. if you pull in a 2 megabytes large library but only use it for one function, only those few lines from the lib will end up in your bundle.