When to use this skill
Use this skill whenever the user wants to:
- Bundle JS/CSS/assets with Webpack, configure loaders, plugins, and optimization
- Handle multiple entries, code splitting, caching, and dev server
How to use this skill
- Configuration:entry、output、module.rules(babel、css、file);plugins(HtmlWebpackPlugin、MiniCssExtract)。
- Advanced: splitChunks, lazy loading, devtool, HMR; environment variables and mode.
- Reference:https://webpack.js.org/
Best Practices
- loader order and exclude; production minification and tree-shaking.
- For large projects, consider Vite or Rspack; caching and build speed.
Keywords
webpack, bundling, loader, plugin, code splitting