Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike: Webpack 2 tree shaking #209

Closed
coopy opened this issue Feb 23, 2016 · 2 comments
Closed

Spike: Webpack 2 tree shaking #209

coopy opened this issue Feb 23, 2016 · 2 comments
Assignees

Comments

@coopy
Copy link
Contributor

coopy commented Feb 23, 2016

I'd like to support the current use of selective imports with descructuring import { foo } from 'lib' without taking a bundle weight hit. Let's see how much work it'd be to upgrade to webpack 2 and enable tree shaking (and how much size savings this would give us).

@okonet
Copy link

okonet commented Jul 23, 2016

Is it implemented or won't be?

@ryan-roemer
Copy link
Member

@boygirl and @coopy know more about this than I do, but we have audited and will continue to audit our bundles to make sure we have either (1) a plugin that tree shakes (like lodash) or (2) manually ensure that we do one-off imports and never have an import with unused exports. We check things with tools like https://github.com/FormidableLabs/inspectpack#parse which can detect multiple es5 / cjs and es-next-style multiple re-exports (the anti-pattern tree-shaking addresses).

My hunch is we'll wait on issues like:

before looking to convert our one-off imports to first class imports that would even implicate tree shaking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants