- Treeshaling only works for named exports. If object is exported and only part of it is imported, the whole object will end up in the bundle.
Source file: src/index.js, rollup's bundle: ./dist/bundle_rollup.js
- Treeshaking with webpack only works during minification process. Source So I couldn't directly compare webpack and rollup bundles but seems like the result is the same.