mcpField
W
webpack-plugin-recipes

webpack-plugin-recipes

github.com/pproencaDevelopment218122 installsUpdated 11w ago
Repository

About webpack-plugin-recipes

A cookbook skill for choosing and adapting webpack 5 plugins to recurring build problems. It provides 26 complete recipes with explanations, variations, and guidance on when not to use each pattern.

Key features

  1. 0126 webpack 5 plugin recipes
  2. 02Six problem-focused categories
  3. 03Complete working plugin examples
  4. 04Explanations and variations
  5. 05Guidance on when not to use

Use cases

  1. 01Adding build-time checks for imports or secrets
  2. 02Generating manifests or virtual modules
  3. 03Adapting webpack output for downstream systems
  4. 04Learning practical plugin patterns

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill webpack-plugin-recipes

After installing, type/webpack-plugin-recipesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
metadata.json
assets/templates/
_template.md
references/
_sections.md
assets-add-cache-busting-query.md
assets-optimize-images.md
assets-pre-compress-gzip-brotli.md
assets-route-by-type.md
assets-skip-empty-chunks.md
dx-build-duration-report.md
dx-diff-changed-chunks.md
dx-notify-on-done.md
dx-open-browser-on-first-build.md
guard-bundle-budget.md
guard-forbidden-imports.md
guard-no-secrets-bundled.md
guard-required-env-vars.md
meta-asset-manifest.md
meta-inject-build-info.md
meta-license-notice.md
meta-sri-manifest.md
transform-banner-with-dynamic-content.md
transform-conditional-polyfill.md
transform-define-from-config.md
transform-replace-library.md
transform-strip-debug-helpers.md
virtual-barrel-from-directory.md
virtual-module-from-memory.md
virtual-routes-from-filesystem.md
virtual-types-from-runtime.md

Details

From the project README

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

Recipe Categories by Priority

PriorityCategoryImpactPrefix
1Build-time GuardrailsCRITICALguard-
2Build Metadata & ManifestsHIGHmeta-
3Virtual Modules & CodegenHIGHvirtual-
4Code TransformationMEDIUM-HIGHtransform-
5Developer ExperienceMEDIUMdx-
6Asset PipelineMEDIUMassets-

Quick Reference

1. Build-time Guardrails (CRITICAL)
2. Build Metadata & Manifests (HIGH)
3. Virtual Modules & Codegen (HIGH)
4. Code Transformation (MEDIUM-HIGH)
5. Developer Experience (MEDIUM)
6. Asset Pipeline (MEDIUM)

How to Use

When the user describes a webpack problem (or asks for a plugin):

  1. Identify the problem category (guardrail? metadata? codegen? transformation? dx? asset?)
  2. Open the matching recipe file — read the Problem section first to confirm it's the right recipe
  3. Use the Plugin section as a working starting point — adapt to the project's specifics
  4. Read How it works for the WHY behind each design choice (cross-references the authoring rules)
  5. Check Variations for common adaptations and When NOT to use to confirm the fit

For learning plugin authoring patterns more broadly, pair with the webpack-plugin-authoring skill — its 44 rules teach the underlying APIs every recipe in this skill applies.

Reference Files

FileDescription
references/_sections.mdCategory definitions and impact levels
assets/templates/_template.mdTemplate for authoring new recipes
metadata.jsonVersion and source references

Comments

Markdown supported