Tagged articles
3 articles
Page 1 of 1
WeDoctor Frontend Technology
WeDoctor Frontend Technology
Jun 27, 2021 · Frontend Development

How Webpack and Rollup Implement Tree-Shaking: A Deep Dive

This article compares the tree‑shaking mechanisms of Rollup and Webpack, explains the three stages Webpack uses (UglifyJS, BabelMinify, Terser), details side‑effects handling, configuration tips, and performance benchmarks, providing practical guidance for optimizing bundle size in modern JavaScript projects.

JavaScriptRollupUglifyJS
0 likes · 18 min read
How Webpack and Rollup Implement Tree-Shaking: A Deep Dive
WeDoctor Frontend Technology
WeDoctor Frontend Technology
May 30, 2021 · Frontend Development

How Rollup’s Tree‑Shaking Eliminates Dead Code: A Deep Dive

This article explains the fundamentals and implementation details of Rollup's tree‑shaking feature, showing how unused JavaScript code is identified and removed through static ES6 module analysis, with practical code examples and visual demonstrations of variable, function, and class elimination.

Code OptimizationES6 ModulesJavaScript
0 likes · 20 min read
How Rollup’s Tree‑Shaking Eliminates Dead Code: A Deep Dive