import { foo, bar } as obj from 'module

Darien Valentine valentinium at
Wed Dec 13 05:08:01 UTC 2017

> tree-shaking is incompatible with class-inheritance and meta-programming
in javascript. it has negligible effect in practice, unless the majority of
your code uses static-functions instead of classes.

It’s just a form of dead code elimination that takes advantage of the fact
that imports/export statements are static. More often useful for library
code than local app code (since if you had unused stuff there, you’d likely
just delete it). I’m pretty perplexed by the suggestion that it has any
sort of relationship with classes or inheritance. Are we talking about
different things?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list