Tag

tree shaking

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 ModulesRollupWebpack
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 ModulesJavaScriptOptimization
0 likes · 9 min read
Understanding Tree Shaking in Webpack: Principles, Usage, and Side‑Effects
ByteDance Web Infra
ByteDance Web Infra
Aug 12, 2022 · Frontend Development

Understanding Bundle‑less: Concepts, Performance Findings, and a Self‑Developed Solution

This article explains the bundle‑less approach—including splitting bundles, no‑bundle development, and modular dependency distribution—presents performance tests that suggest an optimal chunk count of 10‑25, evaluates Vite’s advantages and drawbacks, and outlines a self‑built import‑map‑based solution with code examples.

bundle-lessesbuildfrontend performance
0 likes · 19 min read
Understanding Bundle‑less: Concepts, Performance Findings, and a Self‑Developed Solution
DaTaobao Tech
DaTaobao Tech
May 26, 2022 · Frontend Development

Measuring JavaScript Code Coverage and Reducing Dead Code in Front‑end Projects

By using Chrome DevTools and Istanbul/NYC to measure JavaScript coverage, developers can detect dead and low‑usage code, then convert such modules into dynamic imports via build plugins, enabling tree‑shaking and code‑splitting that reduces bundle size and speeds up first‑screen rendering.

Code CoverageInstrumentationJavaScript
0 likes · 11 min read
Measuring JavaScript Code Coverage and Reducing Dead Code in Front‑end Projects
ByteDance Web Infra
ByteDance Web Infra
May 13, 2022 · Frontend Development

Understanding Tree Shaking, Dead Code Elimination, and Side Effects in JavaScript Bundlers

Tree shaking, a subset of dead‑code elimination based on ES2015 module syntax, removes unused top‑level code, while side‑effect analysis determines which modules can be safely omitted; this article explains the terminology, algorithms, safety vs optimization trade‑offs, and practical debugging steps for modern JavaScript bundlers.

Dead Code EliminationJavaScript bundlersOptimization
0 likes · 19 min read
Understanding Tree Shaking, Dead Code Elimination, and Side Effects in JavaScript Bundlers
DaTaobao Tech
DaTaobao Tech
Feb 28, 2022 · Frontend Development

Understanding ESModule Loading and Execution Process

ESModules load by fetching and parsing files to build a static dependency graph, then instantiate bindings before evaluating each module depth‑first, which ensures deterministic execution, enables concurrent loading and TreeShaking, and explains why circular imports can cause temporal‑dead‑zone ReferenceErrors when exported variables are accessed before initialization.

Circular DependencyESModuleFront-end
0 likes · 10 min read
Understanding ESModule Loading and Execution Process
ByteFE
ByteFE
Aug 31, 2021 · Frontend Development

Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices

This article explains the concept of Tree Shaking as a dead‑code elimination technique based on ES Modules, details how to enable it in Webpack, describes the underlying implementation steps, and provides practical tips for writing tree‑shakable code while avoiding common pitfalls.

Dead Code EliminationESMFrontend Development
0 likes · 14 min read
Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices
ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Jun 7, 2021 · Frontend Development

Understanding Webpack 5 Compilation Process and Tapable Plugin System

This article explains the internal compilation mechanism of webpack 5.11.0, covering Tapable’s event system, the Compiler and Compilation lifecycle, module creation, parsing, resolving, rule compilation, generators, and tree‑shaking, with practical code examples illustrating how plugins and hooks operate.

CompilationCompilerTapable
0 likes · 13 min read
Understanding Webpack 5 Compilation Process and Tapable Plugin System
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Nov 16, 2020 · Frontend Development

Performance Optimization Practices for the XRN Platform (Web and React Native)

NetEase’s XRN platform boosts Web and React Native performance by eliminating duplicate bundles, pruning unused code, importing only needed polyfills, using dynamic imports and bundle splitting, pre‑loading assets, lazily loading images and lists, limiting first‑screen rendering, and applying memoization, raising Lighthouse scores from 50.3 to 80.4 and cutting RN load time by 40 %.

React NativeWebpackcode-splitting
0 likes · 13 min read
Performance Optimization Practices for the XRN Platform (Web and React Native)
Xianyu Technology
Xianyu Technology
Nov 3, 2020 · Mobile Development

Exploring Flutter Tree Shaking Mechanism in the Engine

The article dissects Flutter’s tree‑shaking process within the engine—tracing the compilation pipeline from GenSnapshot through AOT phases, showing how unused methods and resources are identified, retained or discarded, and finally obfuscated, thereby enabling dead‑code elimination, smaller binaries, and seamless Flutter‑FaaS integration.

AOT compilationDartFlutter
0 likes · 9 min read
Exploring Flutter Tree Shaking Mechanism in the Engine
Amap Tech
Amap Tech
Oct 30, 2020 · Frontend Development

Frontend Performance Optimization: Common Issues and Solutions for Large‑Scale Projects

Large‑scale front‑end projects suffer from oversized bundles, unnecessary listeners, deep cloning, and mutable state, causing latency and crashes; the article explains how to diagnose these problems with Chrome DevTools and Webpack tools and resolves them through bundle splitting, tree‑shaking, memoisation, immutable patterns, and caching.

OptimizationPerformanceWebpack
0 likes · 12 min read
Frontend Performance Optimization: Common Issues and Solutions for Large‑Scale Projects
JD Retail Technology
JD Retail Technology
Sep 3, 2020 · Frontend Development

Step‑by‑Step Guide to Building and Publishing a React Component Library with CRA, Docz, and Netlify

This article provides a comprehensive, step‑by‑step tutorial on creating, documenting, and publishing a React component library using create‑react‑app, TypeScript, docz, npm linking, and Netlify, covering configuration, build scripts, on‑demand loading, and deployment best practices.

DoczFrontend DevelopmentNetlify
0 likes · 21 min read
Step‑by‑Step Guide to Building and Publishing a React Component Library with CRA, Docz, and Netlify
JD Tech Talk
JD Tech Talk
Aug 19, 2020 · Frontend Development

Step‑by‑Step Guide to Building and Publishing a React Component Library with Create‑React‑App, Docz, and Netlify

This article provides a comprehensive, hands‑on tutorial for quickly creating a React component library using create‑react‑app, configuring TypeScript, ESLint, node‑sass, docz documentation, npm publishing, tree‑shaking, on‑demand loading, and deploying the generated docs to Netlify.

DoczFrontend DevelopmentNetlify
0 likes · 20 min read
Step‑by‑Step Guide to Building and Publishing a React Component Library with Create‑React‑App, Docz, and Netlify
Sohu Tech Products
Sohu Tech Products
Oct 30, 2019 · Frontend Development

Key Performance and API Improvements in Vue 3

Vue 3 introduces substantial performance gains, a smaller bundle size, tree‑shakable global APIs, a proxy‑based reactivity system, and experimental time‑slicing features, all of which make modern, mobile‑first web development faster and more efficient.

JavaScriptPerformanceVue
0 likes · 10 min read
Key Performance and API Improvements in Vue 3
JD Tech
JD Tech
Mar 5, 2019 · Frontend Development

Optimizing Taro H5 Bundle Size with Tree Shaking and ES Module Refactoring

This article explains how Taro's H5 build size was dramatically reduced by applying dead‑code elimination, configuring sideEffects, converting component and API packages to ES modules, and using webpack's tree‑shaking together with a custom Babel plugin to replace default imports with named imports.

Babel PluginDead Code EliminationES Modules
0 likes · 11 min read
Optimizing Taro H5 Bundle Size with Tree Shaking and ES Module Refactoring
JD Tech
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
How to Make an npm Package Support Tree Shaking Using the pkg.module Field