This article explains micro-frontend concepts, compares qiankun (application-level) and Webpack Module Federation (module-level), provides minimal working demos for both, and shares five practical adoption tips for teams considering micro-frontend architecture.
This article details the design and implementation of a multi‑region H5 platform that uses a single codebase and unified architecture, covering platform UI internationalisation, unified login, three‑layer region storage, environment‑aware configuration, ZooKeeper service discovery, region‑specific DLL builds, and npm private‑registry strategies to achieve seamless deployment across multiple data centres while cutting development effort by up to ninety percent.
This article traces the evolution of frontend engineering from static pages to modern modular workflows, explains the core responsibilities of bundlers, compares Webpack, Vite, and Rspack in terms of architecture, performance, configuration complexity, and ecosystem, and offers guidance on selecting the right tool for a project.
This article traces the evolution of frontend engineering from static HTML pages to modular development, explains the core responsibilities of bundlers, compares Webpack, Vite, and Rspack in terms of architecture, performance, configuration complexity, and ecosystem support, and offers guidance on selecting the right tool for a project.
This guide walks through diagnosing a slow Vue admin dashboard, using webpack‑bundle‑analyzer to spot heavy libraries, offloading Element UI via CDN, enabling gzip compression on Nginx and in the Vue build, and applying code‑splitting and prefetch strategies to keep the first‑screen load under three seconds.
This article explains why modern Webpack applications still suffer from stale browser caches, analyzes the shortcomings of typical cache‑busting tactics, and provides a complete Nginx configuration that ensures HTML never caches while static assets with hashes are cached indefinitely.
This article details how the open‑source SREWorks frontend evolved through a monorepo restructure, selective use of Webpack and Rollup, remote component loading, and build optimizations to achieve a more extensible, plug‑in‑friendly low‑code platform for cloud‑native operations.
This article provides a concise overview of tree shaking mechanisms in major JavaScript bundlers—Webpack/Rspack, esbuild, Turbopack, and Rollup—explaining their implementation stages, static analysis techniques, optimization trade‑offs, and practical code examples that highlight each tool's strengths and limitations.
This article explores the evolution from Module Federation 1.0 to 2.0, detailing its architecture, pain points, new features, supported build tools, performance improvements, and how developers can adopt it across web and native platforms.
This article explains the principles of Tree Shaking, outlines prerequisites, demonstrates common pitfalls such as CommonJS usage, object aggregation, indirect re‑exports, side‑effect modules, and dynamic properties, and provides practical ways to verify that dead code has been successfully removed from your bundle.
ES ModulesFrontend Optimizationdead code elimination
This article explains how to develop a custom plugin that automatically captures Git metadata during build time, injects it into the bundled code, and exposes the information via a console command, with step‑by‑step guidance for both Webpack and Vite projects using Trae‑Builder.
This article explains what Tree Shaking is, how it leverages the static nature of ES6 modules to eliminate dead code during bundling, and provides practical tips for developers to maximize bundle size reduction and improve web performance.
The article introduces auto‑i18n‑translation‑plugins, a Babel‑based automatic internationalization plugin for frontend projects that works with Vite and Webpack, detailing its features, installation, configuration options, translator setup, usage examples, and best practices for generating multilingual JSON translation files without modifying business code.
This article demonstrates how to create a "dist‑info" plugin compatible with Webpack and Vite that automatically injects Git metadata into the built HTML, using the AI‑assisted Trae IDE to scaffold the project, write core code, and publish the package to GitHub and npm.
This article explains why import statements can fill an entire file, examines the problems caused by excessive imports, and presents practical techniques such as module re‑export, require.context, dynamic import, webpack ProvidePlugin, Vite plugins, TypeScript namespaces, aliasing, and Babel plugins to keep import sections concise and maintainable.
The article explains how to build a custom Webpack plugin that uploads compiled static assets to a CDN, rewrites public‑path references to CDN URLs, and employs a hash‑based cache file to skip unchanged files, cutting build time from 40 seconds to 17 seconds in large projects.
The article introduces code‑inspector‑plugin, an open‑source plugin for bundlers like webpack, Vite, and Rspack that lets developers click a DOM element in the browser to instantly open the corresponding source file in their IDE, detailing installation, configuration, usage, implementation principles, and common troubleshooting tips.
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.
This article recounts a production white‑screen caused by missing node polyfills after upgrading to webpack 5, explains how the undefined process.env variables triggered the crash, and shows how to diagnose and resolve the issue using DefinePlugin or a polyfill plugin.
This article compares Rollup and Webpack for bundling JavaScript component libraries, demonstrates how to configure each tool for ESM, CJS, and UMD outputs, shows CSS extraction with plugins versus loaders, and explains why Rollup is preferred for library builds and how Vite leverages it.
This article explains how to detect frontend deployment changes and prompt users to refresh by generating a git‑hash JSON file with git‑revision‑webpack‑plugin, creating Vue mixins for version checking, and comparing hashed filenames in the built index.html, covering three practical solutions with their pros and cons.
This article provides a thorough, English-language guide to optimizing homepage loading speed, covering resource loading techniques, page rendering improvements, and practical Webpack, Nginx, and browser APIs with code examples for developers seeking performance gains.
This article recounts a date‑misalignment bug caused by an unintended Day.js locale change in a mini‑program, explains why the global locale must remain unique, and details a comprehensive static‑analysis solution using ESLint, custom Webpack loaders, and Babel plugins to intercept and block Day.js locale modifications at compile time.
This article explains what first‑screen optimization is and presents ten practical methods—including resource compression, image optimization, asynchronous loading, preloading, CSS/JS optimization, caching strategies, server‑side rendering, CDN acceleration, and delayed loading—complete with detailed Webpack configurations and code examples to improve initial page render speed.
This article explains why and how to migrate a large Vue 2 Webpack codebase to Vite, applying Simon Sinek's Golden Circle model to clarify motivation, method, and concrete steps, and demonstrates the resulting dramatic reduction in build time and bundle size.
This article explains why and how to migrate a complex Webpack‑based frontend project to Vite, using Simon Sinek's Golden Circle model, and details the step‑by‑step migration process, configuration changes, code snippets, and the resulting dramatic performance improvements.
This article explains how to apply Simon Sinek's Golden Circle framework to migrate a large‑scale Webpack‑based frontend project to Vite, detailing the motivations, the faster development experience, step‑by‑step migration procedures, configuration adjustments, and the resulting performance improvements.
This article explores the beta release of Taro 4.0, examines its new HarmonyOS support, CompileMode for mini‑programs, and Vite‑based build chain, then details the configuration pitfalls, debugging steps, source‑code analysis, and practical recommendations for a stable development workflow.
This article walks through a series of practical performance‑boosting techniques for Vue‑based web applications, covering Webpack bundle analysis, Gzip compression, WebP image conversion, HTTP/2 configuration, Nginx tweaks, and OSS/CDN integration, with concrete code snippets and step‑by‑step guidance.
This guide shows how to speed up Vue‑based web apps by configuring Nginx to serve gzip‑compressed files dynamically and using the compression‑webpack‑plugin to pre‑compress JavaScript and CSS during the build, cutting bundle size from megabytes to a few, and halving page‑load times without extra server load.
By leveraging native code tools like esbuild, caching strategies, and a custom pre‑compilation workflow that fakes Webpack's DllPlugin output, this article shows how Mars framework teams dramatically cut compilation times—up to 40% faster—while handling module resolution, resource handling, and cross‑platform challenges.
Module Federation 2.0, released by ByteDance Web Infra and the original author, introduces best‑practice documentation, runtime‑tool decoupling, TypeScript type safety, a devtool, manifest protocol, and cross‑tool support to make micro‑frontend module sharing more flexible and developer‑friendly.
This article provides a comprehensive walkthrough of Webpack’s internal architecture, detailing the core JavaScript bundling workflow, the roles of Compiler and Compilation objects, the lifecycle of plugins and loaders, the parsing of modules into an AST, chunk creation, and the final emission of assets to the output directory.
This article shares the author's practical experience with frontend engineering, covering topics such as project review, coding standards, monorepo tooling, custom CLI/SDK development, testing strategies, code review, bundling choices, monitoring, performance optimization, and knowledge consolidation for team empowerment.
This article details how JD Retail's technology team identified performance bottlenecks in the Star Store mini‑program, applied systematic monitoring, daily walkthroughs, and targeted code, packaging, and rendering optimizations—reducing JS error rates by 81%, cutting page load times by up to 28% and shrinking bundle size by nearly 10%—and outlines future plans for continued user‑experience improvements.
This guide shows how to set up a flexible Webpack devServer proxy that supports multiple test environments, allows switching configurations via npm scripts, and updates target and cookie values on the fly without restarting the server.
This article details a comprehensive approach to improving the performance and user experience of complex H5 game-like applications by using offline package splitting, native splash screens, global state management with zustand, data prefetching, image loading optimizations, transition animations, and ranking list enhancements.
This article explains the principles and implementation details of Vue form validation, the generation of scoped data‑v‑xxx attributes, the composition of build output files, remote loading of .vue components, and how to create a dropdown menu using the render function, providing code examples and step‑by‑step explanations.
The article explains how a custom Webpack resolve plugin enables static compilation for a multi‑scene SaaS car‑service platform by separating brand‑specific logic into suffix‑named files, allowing compile‑time branching, smaller scenario‑specific bundles, cleaner code, easier testing, and faster cold‑starts.
This article shares the 2023 performance‑optimization experience of JD's Tongtian Tower front‑end project, explaining how reducing page load time, improving interaction response, and applying systematic analysis tools and best‑practice techniques can boost first‑screen speed by nearly 60 % while maintaining stable, iterative development.
This article details a year‑long front‑end performance optimization effort for the Tongtian Tower project, covering analysis tools, caching strategies, code splitting, lazy loading, and business‑logic refinements that together delivered a 58.8% reduction in first‑screen load time.
This article explains the overall architecture of Chrome extensions, how to create popup, DevTools, and content scripts using React or Vue, configure manifest.json, set up multi‑entry Webpack builds, debug each component, and perform end‑to‑end testing with Puppeteer and Xvfb for CI environments.
This article examines front‑end performance issues such as page freeze caused by heavy JavaScript computation, explains browser rendering threads, processes, and key Web Vitals (LCP, FID, CLS), and provides practical optimization techniques including code splitting, Web Workers, CDN usage, and build‑time configurations.
This article explains the origins of React Server Components, how Next.js v14 integrates RSC and App Router, the three release channels (Latest, Canary, Experimental), and provides step‑by‑step guidance for using RSC both inside and outside of Next.js with code examples and webpack configuration.
This article explains front‑end engineering, tracing its evolution from simple page building to modern modular architectures, and details how tools like npm, CommonJS, AMD, CMD, ESModules and webpack address challenges such as scope pollution, code standards, resource optimization, testing, CI/CD, and team collaboration.
An in‑depth look at Webpack’s evolution from its 2012 debut to the modern version 5, covering each major release, core concepts like loaders, plugins, tree shaking, module federation, and code‑splitting, plus a practical code example and analysis of its bundled output.
This article provides an in‑depth overview of Webpack, covering its core concepts, entry and output settings, loaders, plugins, mode configurations, source‑map options, browser compatibility, and performance optimizations for both development and production environments.
This guide explains what WebAssembly components are, why Rust is a good choice, how to install the required tools, generate and compile a wasm‑pack project, and adapt the resulting module for real‑world 3D model vertex merging in both webpack and Vite environments.
This article explains a custom Webpack plugin and React component solution that combines code splitting, lazy loading, and preloading to reduce first‑screen resource size, avoid long loading times, and improve user experience in SPA applications.
This article explains why Vite builds projects faster than Webpack by detailing their underlying mechanisms, step‑by‑step configuration of Webpack for Vue, the creation of a custom bundler, and how Vite achieves on‑demand loading and hot module replacement.
This article describes how to engineer Java Velocity templates for local development within a Vue project by creating a Node‑based rendering engine and a custom Webpack loader, enabling hot‑reloading, mock data injection, and seamless integration of Velocity‑generated HTML into the Vue build pipeline.
This article walks through how Vue 2 templates are compiled into render functions using webpack, vue‑loader, template‑loader and the underlying compiler, illustrating each step with project structure, source code snippets, and a deep dive into the AST‑to‑render pipeline.
This article walks through a real‑world front‑end performance overhaul, explaining how Lighthouse metrics revealed major bottlenecks, detailing practical optimizations such as code splitting, lazy loading, image format changes, and CSP setup, and showing how monitoring tools keep the site fast over time.
This article explains how to overcome the 2 MB main‑package size limit in WeChat mini‑programs by asynchronously loading large third‑party libraries such as MQTT.js through subpackages, comparing subpackages with plugins, and providing practical Webpack and uni‑app solutions—including custom require handling, retry mechanisms, and performance gains.
This article explains why tracking npm package usage in large‑scale frontend projects is challenging, compares three implementation approaches, and details a preferred webpack‑plugin solution that provides a seamless, real‑time dashboard without requiring developers to modify their packages.
This roundup highlights cutting‑edge topics ranging from why AI models are named after alpacas and how to converse with PDFs, to practical front‑end performance gains, an in‑depth webpack resolve walkthrough, ten powerful reduce techniques, and five obscure JavaScript native APIs, plus a brief intro to a leading front‑end team.
This article walks through a comprehensive front‑end performance optimization process—starting from diagnosing issues with Lighthouse, identifying bottlenecks such as large bundle size and uncompressed assets, applying code splitting, lazy loading, image optimization, CSP, SEO tweaks, and finally setting up continuous monitoring with a custom platform—to achieve a 279% improvement in Lighthouse performance scores and near‑three‑fold speed gains.
This article explains what source maps are, details their JSON structure, demonstrates how to generate them with Vite and Webpack, discusses choosing appropriate devtool options for development and production, and shows how to make them work in browsers, Sentry, and manual mapping.
This article explains why frontend projects historically needed bundling, describes the evolution of module systems such as CommonJS, AMD, CMD, and ESM, compares bundlers like Webpack and Rollup, and introduces bundle‑less tools like Vite that leverage native ES modules to improve development experience and performance.
This article explains the purpose and format of JavaScript SourceMaps, details the VLQ‑based encoding of the mappings field, and walks through how tools like webpack and Babel generate SourceMaps to map transformed code back to the original source for effective debugging.
The article explains plugin systems by likening them to interchangeable vacuum‑cleaner heads, outlines their benefits, defines core‑and‑plugin architecture, describes four plugin styles with code examples, and demonstrates building a minimal front‑end calculator plugin framework that emphasizes a stable core and extensible modules.
This article explores the history, underlying mechanisms, and practical comparisons of frontend build tools—from early YUI and Ant scripts through AMD/CMD, Grunt/Gulp, Webpack, Rollup, esbuild, and Vite—illustrating how they transform development code into optimized production assets and addressing common performance and configuration challenges.
This article explores the evolution, core principles, and comparative analysis of frontend build tools—from early YUI/Ant and AMD/CMD to modern solutions like Webpack, Rollup, esbuild, and Vite—detailing their functionalities, implementations, performance considerations, and common challenges for developers.
The article describes building a Taro component library whose components, documentation and live demos are generated from a single Markdown source, using Rollup‑built ES modules, a Vite‑based static site, a custom webpack markdown loader, and an isolated H5 demo project to ensure maintainable, reusable code and synchronized documentation.
This article introduces the concept and motivation behind Webpack's Module Federation, explains host and remote roles, outlines practical use cases such as micro‑frontend architecture and resource sharing, and provides a step‑by‑step code walkthrough—including configuration, shared dependencies, and runtime loading—to help developers quickly adopt this decentralized module‑sharing technique.
This article explains the concept, motivation, and application scenarios of Webpack 5 Module Federation, walks through a concrete project structure and configuration, demonstrates runtime code integration, analyzes the generated bundles, and provides resources for further learning, offering a practical entry point into micro‑frontend development.
This article explains how a growing React‑based admin panel was split into independent micro‑frontends using Webpack Module Federation, covering the background, reasons for choosing federation, three integration patterns, step‑by‑step setup, routing, shared state, hot‑reload, deployment considerations and practical code examples.
By shrinking HTML to under 14 KB, replacing large global packages with selective imports, introducing dynamic and lazy loading, externalizing stable libraries via CDN, and caching menu data, the SCM frontend’s common bundle dropped from 1.4 MB to below 200 KB, dramatically improving first‑paint rates and overall page‑load performance.
This article explains Webpack 4’s hot module replacement feature, covering the compilation process, dev‑server setup, entry configuration, websocket communication, the role of HotModuleReplacementPlugin, and the detailed steps of detecting changes, downloading updates via JSONP, and applying updated modules in the browser.
This article examines why bundle size matters for front‑end performance and provides a step‑by‑step guide to reducing Webpack output by optimizing Babel polyfills, leveraging @babel/preset‑env, using @babel/runtime, applying tree‑shaking, and eliminating duplicate dependencies.
This article describes how to build a tool that automatically extracts event tracking (埋点) information from Vue H5 projects by leveraging custom JSDoc tags, Webpack dependency analysis, and an ESLint plugin, enabling one‑click generation of comprehensive tracking documentation and route mapping.
This article explores Webpack's core build process—from startup and compilation to module handling and asset emission—clarifies the execution sequence of loaders versus plugins, explains loader chaining mechanics, and discusses practical optimization techniques for improving build speed and bundle size.
This article walks through creating a minimal webpack implementation that bundles a single entry file, covering prerequisite knowledge, initialization parameters, compilation steps, loader handling, dependency resolution, chunk creation, and file generation, complete with code examples and explanations.
This guide details how a massive music‑artist web application reduced its full build time from 140 seconds to 55 seconds and its incremental compile time from up to 80 seconds down to about 1 second by migrating from Webpack 4 to Webpack 5, including preparation steps, configuration changes, and common pitfalls.
This guide explains how to locate and fix production JavaScript errors by generating source maps, injecting them via Charles proxy, and using VSCode exception breakpoints to debug the original source code as if it were running locally.
This article explores various strategies for sharing code across micro‑frontend applications—including NPM packages, monorepos, Webpack DLLPlugin, Externals, and the powerful Webpack 5 Module Federation—detailing their configurations, performance trade‑offs, and practical implementation steps to achieve efficient, dynamic module sharing.
The article traces the evolution of the unified build‑scripts scaffold—from a basic webpack project to an npm‑packaged, plugin‑driven system that merges user‑defined build.json settings, leverages webpack‑chain for chainable configuration, and finally supports multiple named tasks, demonstrating a flexible architecture for modern frontend development.
This article walks through the step‑by‑step evolution of a unified build‑scripts scaffold—from simple start/build/test commands to a modular, plugin‑driven system that supports shared configurations, user overrides, webpack‑chain, and multi‑task builds across multiple frontend projects.
The article reviews the historical progression of front‑end build techniques from simple script loading and file concatenation to dependency‑based bundlers like webpack and vite, and proposes a future service‑oriented build model to overcome scalability limits.
This tutorial walks you through creating a production‑ready front‑end project from an empty directory using Webpack 5, React 18 and TypeScript, covering project structure, dependencies, Babel and TypeScript setup, resource handling, development environment, performance optimizations, and full configuration files.
This comprehensive, step‑by‑step guide walks developers through Webpack’s core concepts, project setup, configuration files, development server with hot module replacement, essential loaders for CSS, images, Less, and Babel, plus optimization techniques such as JavaScript minification, CSS extraction, and output cleaning.
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.
This article examines low‑code development platforms and presents three remote component loading strategies—global‑object, AMD (require.js), and ESModule—detailing their packaging, CDN deployment, loading logic, advantages, drawbacks, and a final recommendation for ESModule‑based loading in modern front‑end development.
This guide explains how to configure VSCode and webpack to build React and React‑DOM packages with sourcemaps, set up external module loading, and adjust source‑map paths so that debugging in VSCode can directly step through and locate the original React source files.
This article explains how to reduce bundle size in Webpack by manually extracting common libraries into DLLs and configuring automatic code splitting with SplitChunksPlugin, detailing the underlying principles, configuration files, and practical examples using jQuery and Lodash to achieve up to 50% size reduction.
This article provides an in‑depth tutorial on implementing server‑side rendering (SSR) for React applications, covering basic concepts, Koa server setup, ReactDOMServer APIs, routing with react‑router, Redux state hydration, CSS handling, performance optimizations, and modern SSR frameworks such as Next.js and Umi.
Umi 4 is now available on npm and brings a host of new capabilities—including dual Vite/Webpack builds, faster default compilation with MFSU V3, Umi Max for enterprise back‑office, React Router 6, Vue support, automatic HTTPS, build progress UI, terminal logging, plugin APIs, dead‑code detection, and a lightweight UI—while outlining future roadmap items such as MFSU V4, Father 4, dumi 2, and bundless ESMi solutions.
Covering webpack’s evolution from early module systems to modern code‑splitting, the article explains core concepts—entries, loaders, plugins, and chunks—then contrasts the deprecated CommonsChunkPlugin with the heuristic‑driven SplitChunksPlugin, offering configuration tips and best practices for efficient vendor, async, and route‑based bundling.
A lightweight Vue plugin injects file‑path and line‑number metadata into each element during build, lets developers click any page component (with a modifier key) to send a request to a local Node server that launches VSCode directly at the exact source line, streamlining navigation in large Webpack or Vite projects.
Explore a curated set of frontend development articles covering the evolution of asynchronous JavaScript with Promises and async/await, best practices for code reviews, handling race conditions in React, establishing comprehensive frontend standards, the quirks of JavaScript's with statement, and advanced webpack splitChunks and manifest optimization techniques.
This article details the background, architecture, and step‑by‑step performance optimizations—including Packager caching, request reduction, Service‑Worker caching, and Webpack‑style externals—that reduced a CodeSandbox sandbox build from around two minutes to roughly one second.
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.
This article introduces Webpack 5's Module Federation feature, explains its business scenarios, configuration, underlying plugin architecture, and runtime mechanics, provides a practical Vue 3 demo with code snippets, and discusses usage patterns and benefits for micro‑frontend development.
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.
This article analyzes various CSS styling approaches for React component libraries, comparing CSS‑JS association methods and naming‑conflict solutions, and offers guidance on selecting the most suitable strategy based on development workflow, performance, SSR support, and maintainability.
This article explains how Webpack 5's Module Federation feature enables dynamic code sharing and dependency sharing across micro‑frontend applications, walks through its core concepts, shows practical configuration and code examples, and discusses its advantages, drawbacks, and typical use cases.
This article details how the iFanFan team transformed a monolithic Vue front‑end into a micro‑frontend system using a unified CLI tool, covering routing, packaging, independent development, version management, isolation, communication, CI/CD integration, multi‑product support, and performance optimizations.
This collection highlights a free ByteDance backend training camp, alternatives to web frameworks, Node.js architecture, Flutter performance tricks, an underrated Deno overview, Chrome 100 updates, transitional architecture concepts, a Koa2 signaling server tutorial, a detailed Webpack component library guide, and a comprehensive comparison of npm, npx, cnpm, yarn, and pnpm.
This article explains how NutUI’s theme customization enables developers to switch skins, edit component‑level styles, and generate theme variables through an online configurator, providing step‑by‑step usage instructions, code examples for Vite, Webpack and Taro, and a detailed overview of the underlying implementation.
This article chronicles the history of front‑end engineering—from the early stone‑age JSP/PHP era through Maven, Grunt, Webpack, and Snowpack—highlighting key tools, code examples, and future trends that have shaped modern front‑end development practices.