0.1.0 • Published 6 years ago

html-webpack-plugin-remove v0.1.0

Weekly downloads
609
License
MIT
Repository
github
Last release
6 years ago

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>/)
	]
}