webpack-plugin-recipes
Installation
SKILL.md
dot-skills Webpack 5 Plugins Best Practices
Cookbook of 26 production-shaped webpack 5 plugins, organized by the problem they solve. Each recipe starts with a clearly defined problem statement ("here's what hurts without this"), shows the naive non-plugin approach, then provides a complete working plugin (60-150 lines) with explanation, variations, and "when NOT to use" guidance.
Companion to webpack-plugin-authoring — authoring teaches how to write any plugin correctly; recipes teach which plugin to write for a specific pain point. Recipes cross-reference the authoring rules they apply.
When to Apply
Reference these recipes whenever:
- A team has a recurring build-time problem that "feels like it should be a plugin" (architecture rules, secret leak prevention, asset organization)
- You need to integrate webpack output with downstream systems (SSR servers, CDNs, monitoring)
- You're considering whether to write your own plugin OR adopt an existing one — these recipes show the underlying pattern so you can judge fit
- Migrating from another bundler and need to recreate framework-style features (filesystem routing, virtual modules)
- Onboarding new engineers to webpack plugin authoring — recipes give realistic, end-to-end examples