JD Tech
Apr 10, 2018 · Frontend Development
How to Make an npm Package Support Tree Shaking Using the pkg.module Field
This article explains the concept of Tree Shaking, compares CommonJS and ES6 module formats, shows how to configure npm's pkg.module field and bundler settings (Webpack and Rollup) so that a package can be tree‑shakable while remaining compatible with existing tooling.
ES6Module BundlingRollup
0 likes · 7 min read