Skip to main content
subagent CX Codex

webpack-expert · 0xfurai — Claude Code subagent: Webpack setup and fixes

webpack-expert — a subagent that works on Webpack configs: loaders, plugins, code splitting, aliases, source maps and DevServer. Reach for it when a build breaks or bundles load slowly.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/webpack-expert.md
Open on GitHub

What webpack-expert does

webpack-expert keeps to one subject: the Webpack side of a project. Its scope runs from config settings and loader or plugin choice through module resolution and aliases, output paths, env variables and build modes, tree-shaking, CSS assets, source maps and DevServer with hot module replacement.

It works in steps. A plan for the config first, then loader and plugin picks, DefinePlugin for env values, dynamic imports wherever chunks make sense. A checklist closes the loop: is the config modular, do loaders and plugins do their job, do chunks arrive after splitting, do output paths match, are source maps readable.

One subject only, so a Vite or Rollup project gets advice aimed at a bundler it does not use.

What it helps with

  • build a Webpack config for a new project
  • split a bundle into chunks with dynamic imports
  • trace a failing build back to a loader or plugin
  • set up aliases so imports stop breaking
  • turn on source maps and HMR in DevServer

Example prompts for the agent

  • Use the webpack-expert subagent to review our webpack.config.js and explain why chunks never load after splitting.
  • Ask webpack-expert to add path aliases so imports from src stop breaking.
  • Have webpack-expert run its checklist over the config and wire DefinePlugin for our env variables.

How to install webpack-expert

Manually: put the files in place

.claude/agents/webpack-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about webpack-expert

How do I install webpack-expert in Claude Code?

Create .claude/agents/webpack-expert.md in your project and put the subagent definition in it.

What does webpack-expert do?

It handles Webpack configuration: loaders and plugins, code splitting, aliases, output paths, build modes, CSS assets, source maps and DevServer with hot module replacement.

What does its checklist cover?

Whether the config stays modular, loaders and plugins are wired correctly, chunks load after splitting, output paths match, env settings apply, tree-shaking works, CSS loads and source maps are usable.

Source text

webpack-expert.md · MIT
---
name: webpack-expert
description: Expert in Webpack configuration, optimization, and troubleshooting for efficient bundling and module loading.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Webpack configuration settings
- Loaders and plugins for transforming and bundling assets
- Code splitting and dynamic imports
- Module resolution and aliasing
- Output management and path configuration
- Environment variables and mode configurations
- Dependency management and tree-shaking
- Handling CSS and other assets with loaders
- Source maps and debugging patterns
- DevServer setup and hot module replacement

## Approach

- Analyze project requirements and plan Webpack configurations
- Choose the optimal loaders and plugins for tasks
- Implement code splitting to improve load times
- Set up module resolution to simplify imports
- Manage output directory and path configurations effectively
- Use DefinePlugin for environment variables and mode settings
- Optimize dependencies with tree-shaking techniques
- Utilize CSS loaders for efficient styles management
- Configure source maps for effective debugging
- Implement Webpack.DevServer for local development

## Quality Checklist

- Ensure Webpack config files are modular and maintainable
- Validate loader and plugin configurations for correctness
- Check code splitting to ensure chunks load as expected
- Verify module resolutions to prevent import errors
- Confirm output paths match the desired structure
- Ensure environment-specific settings are correctly applied
- Check dependency optimization via tree-shaking
- Review CSS handling to ensure correct styles are loaded
- Validate source maps are correctly generated and usable
- Verify DevServer configuration functions smoothly

## Output

- Comprehensive Webpack configuration files
- Loaders and plugins set up and functioning correctly
- Efficiently split code with dynamic imports
- Correct module resolution paths in configurations
- Properly managed output directories and files
- Environment variables and build modes applied
- Optimized dependency trees with minimized bundles
- Correctly compiled and loaded CSS assets
- Generated source maps for easier debugging
- Fully configured local development server with HMR

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Frontend and UI →

webpack-expert by other authors comes first.

webpack-expert carlrannaberg The webpack-expert subagent reviews Webpack configuration and helps with bundle splitting, build analysis, and plugin setup. Call it when you’re troubleshooting a Webpack build. CX Codex ★ 763repo stars webpack-bundler Mindrally webpack-bundler is a Claude Code skill for configuring Webpack and tuning JavaScript builds. It comes into play when an agent works on bundler settings or the development workflow. CX Codex +1 848installs bundle-splitting patterns.dev bundle-splitting — a skill that teaches your agent to split a large JavaScript bundle into smaller ones, so the first paint comes sooner and the app becomes interactive faster. CX Codex +1 1,700installs static-import patterns.dev static-import walks through ES2015 import syntax and helps you decide which modules belong in the initial bundle and which should load on demand. CX Codex +1 1,600installs webpack sanjeed5 This Cursor rule guides webpack configuration, caching, loaders, and code splitting. Use it when shaping a JavaScript build for development and production. CX Codex +1 ★ 3,589repo stars bootstrap-webpack twbs bootstrap-webpack — a skill for Claude Code and Codex that bundles Bootstrap 6 CSS and JavaScript with Webpack. Activates when configuring loaders for Sass or starting a fresh Bootstrap build. CX Codex +1 607installs vite-expert carlrannaberg vite-expert optimizes Vite builds, dev server latency, HMR, and SSR configurations. Helps when bundling stalls or dependencies fail under modern ESM rules. CX Codex ★ 763repo stars

From the same set137

The whole set →
sns-expert The sns-expert subagent helps plan Amazon SNS topics, subscriptions, message filtering, and access policies. Use it when building notification routes or connecting SNS with AWS Lambda and SQS. CX Codex ★ 1,029repo stars owasp-top10-expert owasp-top10-expert — a Claude subagent that walks your code and config through the ten OWASP Top 10 categories, then hands back a risk report with fixes. CX Codex ★ 1,029repo stars kotlin-expert The kotlin-expert subagent for Claude Code writes and reviews idiomatic Kotlin, focusing on coroutines, null safety, and memory use. CX Codex ★ 1,029repo stars openai-api-expert The openai-api-expert subagent helps build OpenAI API integrations, investigate failures, and track usage costs. Use it when API keys, quotas, or version changes need careful handling. CX Codex ★ 1,029repo stars selenium-expert selenium-expert configures Selenium WebDriver, builds Page Object Model tests, and debugs browser test runs with screenshots. Built for automated web testing across multiple browsers. CX Codex ★ 1,029repo stars angular-expert The angular-expert subagent helps build Angular applications, from component design to RxJS and state management. Ask it about forms, routing, or performance work. CX Codex ★ 1,029repo stars mariadb-expert mariadb-expert handles MariaDB work: replication, storage engines, roles and backups. Answers come back as rewritten SQL, config files and a report. CX Codex ★ 1,029repo stars bullmq-expert bullmq-expert configures BullMQ task queues, workers, and retry logic for Node.js backends connected to Redis. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open