Installation
Requirements
Install
Install the plugin using your favorite package manager:
- npm
- yarn
- pnpm
npm install --save-dev html-bundler-webpack-plugin
yarn add --dev html-bundler-webpack-plugin
pnpm add --save-dev html-bundler-webpack-plugin
Known Webpack loaders/plugins
Recommended loaders
Resources | Packages | Notes |
---|---|---|
JS/TS | babel-loader | Optional |
JS/TS | swc-loader | Optional |
CSS | css-loader | Required for CSS styles |
CSS | postcss-loader | Optional |
SASS/SCSS | sass, sass-loader | Required for SASS/SCSS |
Recommended optimization plugins
Resources | Package | Notes |
---|---|---|
JS | terser-webpack-plugin | Optional |
JS | swc-minify-webpack-plugin | Optional |
HTML | html-minimizer-webpack-plugin | Optional |
Images | image-minimizer-webpack-plugin | Optional |