Skip to content

Commit 7b81bb1

Browse files
committed
Support to webpack 5 added
1 parent daf6798 commit 7b81bb1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/ashutoshSce/minify-html-webpack-plugin)](https://github.com/kangax/html-minifier)
77
[![NPM](https://img.shields.io/npm/l/minify-html-webpack-plugin)](https://www.npmjs.com/package/minify-html-webpack-plugin)
88

9-
This is a [webpack](http://webpack.github.io/) plugin that can minimize the HTML with [HTMLMinifier](https://www.npmjs.com/package/html-minifier) for all source directory files and copy into destinations directory during the Webpack build.
9+
This is a [webpack](http://webpack.github.io/) plugin that can minimize the HTML with [HTMLMinifier](https://www.npmjs.com/package/html-minifier) for all source directory files and copy into destinations directory recursively iterating through all subfolders and files during the Webpack build.
1010

1111
Installation
1212
============
@@ -44,7 +44,7 @@ Add the plugin to your webpack and config as follows:
4444

4545
Optional Add Search And Replace Rules
4646
=================
47-
If need to replace string and then minify it across source files.
47+
If need to replace strings and then do minification across all source files in directoris and sub-directories.
4848

4949
```javascript
5050
const MinifyHtmlWebpackPlugin = require('minify-html-webpack-plugin');
@@ -62,16 +62,18 @@ If need to replace string and then minify it across source files.
6262
},
6363
searchAndReplace: [
6464
{
65-
search: 'search_string', /* The string, or regular expression, that will be replaced by the new value */
66-
replace: 'replace_string' /* The string to replace the search value with */
65+
/* The string, or regular expression, that will be replaced by the new value */
66+
search: 'search_string',
67+
/* The string to replace the search value with */
68+
replace: 'replace_string'
6769
}
6870
]
6971
});
7072
]
7173
};
7274
```
7375

74-
If need to replace array of string with common replace funtions and then minify it across source files.
76+
If need to replace array of string with common replace funtions and then minify it across source files and sub-directories.
7577

7678
```javascript
7779
const MinifyHtmlWebpackPlugin = require('minify-html-webpack-plugin');
@@ -118,7 +120,7 @@ If need to replace array of string with common replace funtions and then minify
118120

119121
Laravel Mix Users
120122
=================
121-
Paste below snippets into mix.js file.
123+
Paste below snippets into webpack.mix.js file.
122124

123125
```javascript
124126
const MinifyHtmlWebpackPlugin = require('minify-html-webpack-plugin');

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "minify-html-webpack-plugin",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "A webpack plugin to minify html file(s) after building",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1"
@@ -9,7 +9,7 @@
99
"html-minifier": "^4.0.0"
1010
},
1111
"peerDependencies": {
12-
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
12+
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
1313
},
1414
"repository": {
1515
"type": "git",

0 commit comments

Comments
 (0)