Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 533 Bytes

README.md

File metadata and controls

9 lines (6 loc) · 533 Bytes

Exploring treeshaking with rollup and webpack 4.

  1. 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

  1. 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.