material-motion-js icon indicating copy to clipboard operation
material-motion-js copied to clipboard

Optimize bundle sizes

Open appsforartists opened this issue 9 years ago • 4 comments

  • Make examples depend on dist (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.

appsforartists avatar Jul 07 '16 00:07 appsforartists

Also explore if Closure Compiler or TypeScript do a better job than Webpack + Uglify for bundling.

appsforartists avatar Jul 29 '16 02:07 appsforartists

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.

appsforartists avatar Aug 13 '16 00:08 appsforartists

There's also the new Webpack Closure plugin that we can experiment with.

appsforartists avatar Aug 21 '16 15:08 appsforartists

The Cost of Small Modules is one more point in the Closure bucket.

appsforartists avatar Sep 26 '16 23:09 appsforartists