https://github.com/coco-platform/webpack-plugin-html-minify
cooperate with `html-webpack-plugin`, take place build-in html minify, which make life cycle more clear.
https://github.com/coco-platform/webpack-plugin-html-minify
html-minifier webpack
Last synced: 2 months ago
JSON representation
cooperate with `html-webpack-plugin`, take place build-in html minify, which make life cycle more clear.
- Host: GitHub
- URL: https://github.com/coco-platform/webpack-plugin-html-minify
- Owner: coco-platform
- Created: 2017-09-05T06:39:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T00:04:41.000Z (about 6 years ago)
- Last Synced: 2025-10-01T20:53:54.966Z (9 months ago)
- Topics: html-minifier, webpack
- Language: JavaScript
- Homepage:
- Size: 490 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @coco-platform/webpack-plugin-html-minify

[](https://coveralls.io/github/coco-platform/webpack-plugin-html-minify?branch=master) [](https://greenkeeper.io/)


## Usage
```shell
# npm
npm install @coco-platform/webpack-plugin-html-minify --only=dev;
# yarn
yarn add @coco-platform/webpack-plugin-html-minify --dev;
```
## Options
Please see https://github.com/kangax/html-minifier#options-quick-reference for complete options.
## Example
Then config the webpack:
```javascript
const configuration = {
entry: path.resolve(__dirname, '__fixture__', 'index.js'),
resolve: {
extensions: ['.js', '.css'],
},
output: {
path: path.resolve(process.cwd(), 'dist'),
filename: '[name].js',
publicPath: '/',
},
module: {
rules: [],
},
plugins: [
Reflect.construct(HtmlWebpackPlugin, [
{
template: path.resolve(__dirname, '__fixture__', 'index.html'),
inject: 'body',
},
]),
Reflect.construct(HtmlMinifyPlugin, []),
],
};
```
## License
MIT