From 7b81bb1a16939fc62dd112931713ba6270e68333 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Wed, 17 Feb 2021 01:13:18 +0530 Subject: [PATCH] Support to webpack 5 added --- README.md | 14 ++++++++------ package.json | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2a44656..a6894ce 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/ashutoshSce/minify-html-webpack-plugin)](https://github.com/kangax/html-minifier) [![NPM](https://img.shields.io/npm/l/minify-html-webpack-plugin)](https://www.npmjs.com/package/minify-html-webpack-plugin) -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. +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. Installation ============ @@ -44,7 +44,7 @@ Add the plugin to your webpack and config as follows: Optional Add Search And Replace Rules ================= -If need to replace string and then minify it across source files. +If need to replace strings and then do minification across all source files in directoris and sub-directories. ```javascript const MinifyHtmlWebpackPlugin = require('minify-html-webpack-plugin'); @@ -62,8 +62,10 @@ If need to replace string and then minify it across source files. }, searchAndReplace: [ { - search: 'search_string', /* The string, or regular expression, that will be replaced by the new value */ - replace: 'replace_string' /* The string to replace the search value with */ + /* The string, or regular expression, that will be replaced by the new value */ + search: 'search_string', + /* The string to replace the search value with */ + replace: 'replace_string' } ] }); @@ -71,7 +73,7 @@ If need to replace string and then minify it across source files. }; ``` -If need to replace array of string with common replace funtions and then minify it across source files. +If need to replace array of string with common replace funtions and then minify it across source files and sub-directories. ```javascript 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 Laravel Mix Users ================= -Paste below snippets into mix.js file. +Paste below snippets into webpack.mix.js file. ```javascript const MinifyHtmlWebpackPlugin = require('minify-html-webpack-plugin'); diff --git a/package.json b/package.json index d08ef18..5d65b16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minify-html-webpack-plugin", - "version": "1.1.5", + "version": "1.1.6", "description": "A webpack plugin to minify html file(s) after building", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -9,7 +9,7 @@ "html-minifier": "^4.0.0" }, "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0" + "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" }, "repository": { "type": "git",