microbundle
microbundle copied to clipboard
Feature request: opt in tsickle to closure-compiler support
This is a weird request and I could be confused but here it goes.
So there are libraries like BabylonJS that are:
- Large libraries.
- Statically typed in typescript https://github.com/BabylonJS/Babylon.js/tree/master/src
- Tree shakeable using es6 modules https://doc.babylonjs.com/features/es6_support#typescript
For a small scene, using microbuild, I got a brotli bundle of 144kb. Before es6 modules were introduced in BabylonJS and before I used microbundle, I had bundles that were over 2mbs.
In my experience, using closure-compiler could reduce this bundle by an additional 20%. However, setting up closure-compiler is a pain! I love microbundle for its zero-configuration approach and was wondering if we could get opt-in support for Typescript to tsickle to closure-compiler with ADVANCED_OPTIMIZATIONS turn on.
Getting a library like BabylonJS for just over 100k would be amazing.
I love this idea, but I do find myself wondering if that would be better served as a separate project?
Yay Im glad you like it! I'm fine with a separate project but I see many overlaps like typescript support, API commands like watch, brotli compression. Anything else you see in common or see different from microbundle