Tag

ES6 Modules

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

Dead Code EliminationES6 ModulesReact.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.

ES6 ModulesFrontendRollup
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.

ES6 ModulesFrontendOptimization
0 likes · 9 min read
Understanding Tree Shaking in Webpack: Principles, Usage, and Side‑Effects