webpack-expert

Diagnose and optimize Webpack configurations, bundle splitting, and module federation setups.

3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/trudyan141/my-antigravity-agents-kit --skill webpack-expert-trudyan141
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webpack-expert
Source: https://github.com/trudyan141/my-antigravity-agents-kit/tree/main/templates/.agent/skills/webpack-expert
Command: npx skills add https://github.com/trudyan141/my-antigravity-agents-kit --skill webpack-expert-trudyan141

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Webpack builds often suffer from oversized bundles, slow build times, cryptic module resolution errors, and misconfigured code splitting. This Skill provides expert-level diagnosis and fixes for Webpack configuration, optimization, and architecture problems. ## Core Features & Use Cases - Bundle Optimization: Configure SplitChunksPlugin, tree shaking, and TerserPlugin to reduce bundle size and improve caching. - Build Performance: Enable Webpack 5 filesystem caching, thread-loader parallelization, and development-mode tuning to cut build times. - Module Federation: Set up host and remote micro-frontend configurations with aligned shared dependency versions. - Use Case: Your production bundle exceeds 500KB and Lighthouse flags slow loading. Invoke this Skill to analyze the bundle composition, configure vendor/common cache groups, and add dynamic imports for route-level code splitting. ## Quick Start Use the webpack-expert skill to analyze my webpack.config.js and reduce my production bundle size.

Frequently Asked Questions about webpack-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Webpack bundle size?

Enable code splitting with splitChunks configured for vendor and common cache groups, add dynamic imports for routes, and turn on tree shaking with usedExports and sideEffects flags. Use webpack-bundle-analyzer to identify the largest modules first.

How to speed up slow Webpack builds?

Enable Webpack 5 filesystem caching with buildDependencies tracking, use thread-loader for parallel Babel or TypeScript processing, and limit resolve.extensions. In development, use eval-cheap-module-source-map and disable production optimizations.

Does Webpack 5 support module federation for micro-frontends?

Yes, Webpack 5 includes ModuleFederationPlugin for exposing and consuming remote modules across applications. Shared dependencies like react must use singleton and strictVersion settings aligned between host and remote configurations.

Why does Webpack fail with module not found errors?

Module resolution failures usually come from missing file extensions in resolve.extensions, incorrect path aliases, or absent Node.js polyfill fallbacks in Webpack 5. Verify resolve.alias mappings and add resolve.fallback entries for modules like crypto or stream.

What replaced file-loader and url-loader in Webpack 5?

Webpack 5 asset modules replaced file-loader and url-loader with built-in types: asset/resource, asset/inline, asset/source, and asset. The asset type automatically inlines files below a configurable size threshold.