material-motion-js
material-motion-js copied to clipboard
Optimize bundle sizes
- Make
examplesdepend ondist(rather than bundling it) - Figure out why Webpack spits out such big bundles and how to make them tiny.
- Stripping out all non-license comments is probably a good start.
- Google probably has awesome GZIP tools. Maybe we should distribute our own gzipped bundles?
- https://github.com/robertknight/webpack-bundle-size-analyzer is a rough place to begin
Loosely related to #3.
Also explore if Closure Compiler or TypeScript do a better job than Webpack + Uglify for bundling.
My current plan is to test if using rxjs in TypeScript tree-shakes as effectively as using rxjs-es and the :: operator does now. If so, I'll likely migrate from rxjs-es and Flow to rxjs and TypeScript to make the toolchain more congruent with what's in use internally (and to avoid having to write transforms to convert Flow annotations to Closure type annotations). We're not getting much use out of Flow now, because :: breaks its parser.
Will likely spend the next few weeks prototyping the Circles interaction and then start exploring this.
There's also the new Webpack Closure plugin that we can experiment with.
The Cost of Small Modules is one more point in the Closure bucket.