Tag

es6 modules

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Jan 15, 2025 · Frontend Development

Tree Shaking in React.js: Principles, Best Practices and Applications

Tree shaking in React.js leverages ES6 static imports and named exports to eliminate dead code, reducing bundle size and improving load performance, while best practices such as modular design, avoiding side effects and dynamic imports ensure optimal dead‑code elimination across components and libraries.

Code OptimizationDead Code EliminationReact.js
0 likes · 7 min read
Tree Shaking in React.js: Principles, Best Practices and Applications
政采云技术
政采云技术
Nov 22, 2022 · Frontend Development

Understanding Tree‑shaking in Rollup and Webpack: Mechanisms, Configurations, and Comparison

This article explains the purpose and ES6‑module basis of tree‑shaking, compares the implementation details of Rollup and Webpack, provides configuration and code examples, and shows real‑world bundle size and build‑time results to help developers choose the right bundler for optimal output.

RollupTree ShakingWebpack
0 likes · 14 min read
Understanding Tree‑shaking in Rollup and Webpack: Mechanisms, Configurations, and Comparison
政采云技术
政采云技术
Aug 23, 2022 · Frontend Development

Understanding Tree Shaking in Webpack: Principles, Usage, and Side‑Effects

This article explains how Webpack’s tree shaking removes dead code and unused assets by analyzing ES6 module imports, demonstrates configuration for development and production builds, and discusses the role of sideEffects in achieving optimal bundle size.

JavaScriptTree ShakingWebpack
0 likes · 9 min read
Understanding Tree Shaking in Webpack: Principles, Usage, and Side‑Effects
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 OptimizationJavaScriptRollup
0 likes · 20 min read
How Rollup’s Tree‑Shaking Eliminates Dead Code: A Deep Dive