Microbundle: Bundle too slow

Created on 7 Nov 2019  路  8Comments  路  Source: developit/microbundle

Version: microbundle@next 0.12.0-next.6
script: 'microbundle watch --external all --format umd --sourcemap false'
dependencies: : {
        "@uppy/core": "^1.6.0",
        "@uppy/dashboard": "^1.5.0",
        "@uppy/locales": "^1.9.0",
        "@uppy/xhr-upload": "^1.4.0",
        "qiniu-js": "^2.5.5"
    }

I have to wait 8s for my bundle code.
But I just want to dev my code. It there have some methods to be faster when bundle code?

WeChat Work Screenshot_20191107184200.png

Most helpful comment

One area that could likely lead to speed improvements for microbundle would be to leverage the new output plugins feature by Rollup@2. That would only run the whole bundling process once instead of for each format (usually 3-5 times). The whole bundling process is what's costing the most time.

All 8 comments

You can use the --no-compress flag to skip the minification process. It should speed up compilation time noticeably at the cost of a larger bundle size.

Slow bundle has been brutal. Taking ~ 212s to compile 5.5 kb library at the moment.

You can disable gzipping by using the --raw switch. No need to slow down the build just to show-off your compressed bundle sizes :-)

I wish my bundle time was 8s lol. Mine is more like 3 minutes :(

You can use the --no-compress flag to skip the minification process.

I feel like even with this flag, the bundling is really slow.

You can disable gzipping by using the --raw switch.

Are you sure that's the case? Docs say Show raw byte size (default false).
For microbundle watch it be really nice to know what costs so much time, to disable it for debugging...

One area that could likely lead to speed improvements for microbundle would be to leverage the new output plugins feature by Rollup@2. That would only run the whole bundling process once instead of for each format (usually 3-5 times). The whole bundling process is what's costing the most time.

Are you sure that's the case? Docs say Show raw byte size (default false).
For microbundle watch it be really nice to know what costs so much time, to disable it for debugging...

@TimDaub yes, it's gzipped in memory to show the size, it can improve build time to some degree

We've done all that we can for this in Microbundle 0.13. The next major version will use output transpilation as Marvin described.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andarist picture Andarist  路  33Comments

omgovich picture omgovich  路  16Comments

skipjack picture skipjack  路  11Comments

gamtiq picture gamtiq  路  28Comments

zzswang picture zzswang  路  14Comments