About webpack
The webpack skill guides developers configuring Webpack to bundle JavaScript, CSS, and other assets. It covers loaders, plugins, multi-entry builds, code splitting, and development-server topics.
Key features
- 01Configure entry, output, and module rules
- 02Set up loaders and plugins
- 03Handle multiple entries and code splitting
- 04Configure caching, HMR, and environment variables
- 05Apply production minification and tree-shaking practices
Use cases
- 01Configure JavaScript and CSS bundling
- 02Set up code splitting for multi-entry projects
- 03Address loader order or build optimization issues
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ build-skills --skill webpackAfter installing, type/webpackin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 用 Webpack 打包 JS/CSS/资源、配置 loader、plugin 与优化
- 处理多入口、代码分割、缓存与 dev server
How to use this skill
- 配置:entry、output、module.rules(babel、css、file);plugins(HtmlWebpackPlugin、MiniCssExtract)。
- 进阶:splitChunks、懒加载、devtool、HMR;环境变量与 mode。
- 参考:https://webpack.js.org/
Best Practices
- loader 顺序与 exclude;生产压缩与 tree-shaking。
- 大项目考虑 Vite 或 Rspack;缓存与构建速度。
Keywords
webpack, 打包, loader, plugin, 代码分割
Comments
Markdown supported