home / skills / partme-ai / full-stack-skills / webpack
This skill helps you configure and optimize Webpack builds, split code, choose loaders and plugins, and streamline development workflows.
npx playbooks add skill partme-ai/full-stack-skills --skill webpackReview the files below or copy the command above to add this skill to your agents.
---
name: webpack
description: Provides comprehensive guidance for Webpack bundler including configuration, loaders, plugins, code splitting, optimization, and development setup. Use when the user asks about Webpack, needs to configure Webpack, set up build pipelines, optimize bundles, or work with Webpack plugins.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides comprehensive, practical guidance for using Webpack as a JavaScript and asset bundler. It helps you create and refine webpack configurations, choose and configure loaders and plugins, implement code splitting, and optimize builds for development and production. The guidance emphasizes concrete examples, common patterns, and trade-offs to get predictable build outputs and fast iteration loops.
The skill inspects your project goals and current setup, then recommends concrete webpack config snippets and folder layouts tailored to frameworks (vanilla, React, Vue) and languages (TypeScript, Babel). It explains loader/plugin choices, shows how to enable HMR, and gives step-by-step optimization techniques such as tree shaking, minification, caching, and bundle analysis. For each recommendation it highlights compatibility, typical configuration, and commands to run.
Do I need webpack for every project?
Not always. Use webpack when you need fine-grained control over bundling, asset processing, or optimizations. For simple sites, lighter tools or framework CLIs may be faster to adopt.
How do I debug long build times?
Profile builds with --profile and webpack-bundle-analyzer, inspect slow loaders/plugins, enable caching (cache: true) and parallelize work (thread-loader) to speed up rebuilds.