Individual skill
webpack-plugin-recipes
Use whenever you face a webpack-build problem that ends with needing to write a plugin — 26 production-shaped recipes covering bundle-size budgets, forbidden architectural imports, env-var validation, secret-leak prevention, build-info injection, asset manifests, license walking, SRI hashes, virtual modules (Vite-style), filesystem routing (Next.js-style), generated barrels, runtime-driven TS types, library replacement (react→preact), debug-stripping, conditional polyfills, dynamic banners, feature flags, build-duration regression tracking, desktop/Slack notifications, changed-chunks diffing, browser auto-open, gzip/brotli pre-compression, image optimization, type-based dist layout, empty-chunk cleanup, cache-busting query strings. Each recipe is a complete working plugin drawn from production patterns at Next.js, Storybook, webpack-contrib. Trigger when the user asks how to do X with webpack or whether a plugin exists for X. Companion to webpack-plugin-authoring.
skills/.experimental/webpack-plugin-recipes/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- engineering Derived category
- engineering-web Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 9,694 bytesSKILL.mdcore · 7,881 bytesSKILL.mdcore · 7,881 bytesSKILL.mdcore · 7,881 bytesassets/templates/_template.mddoc · 5,054 bytesmetadata.jsonasset · 2,685 bytesreferences/_sections.mddoc · 3,575 bytesreferences/assets-add-cache-busting-query.mddoc · 7,698 bytesreferences/assets-optimize-images.mddoc · 8,873 bytesreferences/assets-pre-compress-gzip-brotli.mddoc · 9,396 bytesreferences/assets-route-by-type.mddoc · 7,319 bytesreferences/assets-skip-empty-chunks.mddoc · 8,213 bytesreferences/dx-build-duration-report.mddoc · 7,705 bytesreferences/dx-diff-changed-chunks.mddoc · 8,027 bytesreferences/dx-notify-on-done.mddoc · 7,905 bytesreferences/dx-open-browser-on-first-build.mddoc · 7,629 bytesreferences/guard-bundle-budget.mddoc · 7,254 bytesreferences/guard-forbidden-imports.mddoc · 7,962 bytesreferences/guard-no-secrets-bundled.mddoc · 8,405 bytesreferences/guard-required-env-vars.mddoc · 6,601 bytesreferences/meta-asset-manifest.mddoc · 8,623 bytesreferences/meta-inject-build-info.mddoc · 8,499 bytesreferences/meta-license-notice.mddoc · 9,580 bytesreferences/meta-sri-manifest.mddoc · 8,188 bytesreferences/transform-banner-with-dynamic-content.mddoc · 7,220 bytesreferences/transform-conditional-polyfill.mddoc · 7,955 bytesreferences/transform-define-from-config.mddoc · 8,450 bytesreferences/transform-replace-library.mddoc · 7,236 bytesreferences/transform-strip-debug-helpers.mddoc · 7,647 bytesreferences/virtual-barrel-from-directory.mddoc · 8,097 bytesreferences/virtual-module-from-memory.mddoc · 7,511 bytesreferences/virtual-routes-from-filesystem.mddoc · 7,755 bytesreferences/virtual-types-from-runtime.mddoc · 8,557 bytes
Read excerpt
# 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`](../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)