Skip to content

Too many small chunks #2901

Open
Open
@alexblack

Description

@alexblack

We're using Remix, which uses esbuild, and our webapp build produces 91 chunks, about 50% of which are less than 1kb, which means our webpages import around 30-35 chunks, which I think is really inefficient for the browser.

Are there any good work arounds to avoid this?

One of our chunks is:

var e="web";export{e as a};

This appears to be coming from a single typescript file with a single constant in it... so I guess I can fix that by moving the constant to another file.

There are a few like this:

import{b as o}from"/build/_shared/chunk-2LOM2E4Y.js";var p=o((r,e)=>{e.exports={}});export{p as a};
//# sourceMappingURL=/build/_shared/chunk-SIMRMZHU.js.map

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