Ready to work offline!

New content is available. Click OK to refresh all open tabs.

FAQ - bundlejs


I frequently get asked what was the point in building bundlejs, this is a short, quick, and simple summary of frequently asked questions and my reasons for building bundlejs.

What is the advantage over bundlephobia?

There are a couple reasons for this, but the main one is that bundlephobia wasn't reliable enough.

What do you mean wasn't reliable enough?

Right now bundlephobia, is a bit hit or miss when it comes to treeshaking. So, I built, which can treeshake bundles accurately.

For example, try treeshaking the Event class from @okikio/emitter using bundlephobia and try treeshaking the Event class using

export { Event } from "@okikio/emitter";

You will notice a major package size disparity. This is only one example and I am sure others exist, I hope the above example illustrates my point.

Another problem with bundlephobia is the lack of good error reporting if (for whatever reason) bundlephobia isn't able to bundle your package, it logs this to the console,

    "code": "BuildError",
    "message": "Failed to build this package.",
    "details": {
        "name": "BuildError"

this just isn't very useful for debugging.

On the other hand, since, runs locally right on your computer, when an error occurs it logs the exact error you would see when using esbuild or other bundlers in your build process, making it much easier to know exactly what is wrong with your js bundle.

Wait, locally as in no external servers?

Yes, locally right on your browser, I used esbuild-wasm for the main bundler and rollup for more accurate treeshaking.

Can it bundle multiple packages and treeshake them?

Yes. can treeshake all packages, and it can do so accurately.