html-webpack-plugin-remove

Remove parts of html emitted by the html-webpack-plugin using a regular expression

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
html-webpack-plugin-remove
0.1.06 years ago8 years agoMinified + gzip package size for html-webpack-plugin-remove in KB

Readme

html-webpack-plugin-remove
Latest Version on NPM
Remove parts of html emitted by the html-webpack-plugin using a regular expression.
The plugin hooks into events emitted by the html-webpack-plugin and simply replaces the parts that match a passed in regular expression.

Install

npm i html-webpack-plugin-remove --save-dev

webpack.config.js

const HtmlPlugin = require('html-webpack-plugin')
const HtmlPluginRemove = require('html-webpack-plugin-remove')

module.exports = {
	/* ... */
	plugins: [
		new HtmlPlugin(/* ... */),
		new HtmlPluginRemove(/<script.*?src="style\..*?\.js".*?<\/script>/)
	]
}