html-replace-webpack-plugin
Advanced tools
Comparing version 2.2.1 to 2.2.3
{ | ||
"name": "html-replace-webpack-plugin", | ||
"version": "2.2.1", | ||
"version": "2.2.3", | ||
"description": "A Webpack plugin for replace HTML contents with custom pattern string or regex.", | ||
@@ -14,2 +14,3 @@ "main": "index.js", | ||
"keywords": [ | ||
"html-replace-webpack-plugin", | ||
"html", | ||
@@ -16,0 +17,0 @@ "replace", |
@@ -14,3 +14,3 @@ # [html-replace-webpack-plugin] | ||
### In the `webpack.config.js` file: | ||
### In the `webpack.config.js` file as a plugin: | ||
```javascript | ||
@@ -55,14 +55,5 @@ var webpack = require('webpack') | ||
const resource = { | ||
js: | ||
{ | ||
'bootstrap': '//cdn/bootstrap/bootstrap.min.js' | ||
}, | ||
css: | ||
{ | ||
'bootstrap': '//cdn/bootstrap/bootstrap.min.css' | ||
}, | ||
img: | ||
{ | ||
'the-girl': '//cdn/img/the-girl.jpg' | ||
} | ||
js: {'bootstrap': '//cdn/bootstrap/bootstrap.min.js'}, | ||
css: {'bootstrap': '//cdn/bootstrap/bootstrap.min.css'}, | ||
img:{'the-girl': '//cdn/img/the-girl.jpg'} | ||
} | ||
@@ -86,3 +77,2 @@ | ||
</head> | ||
<body> | ||
@@ -103,3 +93,2 @@ <div>foo</div> | ||
</head> | ||
<body> | ||
@@ -116,11 +105,11 @@ <div>`foo` has been replaced with `bar`</div> | ||
### Options for `html-replace-webpack-plugin` | ||
new HtmlReplaceWebpackPlugin([obj1[, obj2[, obj3[, ...]]]] | obj) | ||
new HtmlReplaceWebpackPlugin([obj1[, obj2[, obj3[, ...[, objN]]]]] | obj) | ||
#### [obj1[, obj2[, obj3[, ...]]]] | obj | ||
#### [obj1[, obj2[, obj3[, ...[, objN]]]]] | obj | ||
Type: `Objects Array` | `Object` | ||
#### obj1, obj2, obj3, ... | obj | ||
#### obj1, obj2, obj3, ..., objN | obj | ||
Type: `Object` | ||
#### objN.pattern | ||
#### obj.pattern | ||
Type: `String` | `RegExp` | ||
@@ -130,6 +119,6 @@ | ||
#### objN.replacement | ||
#### obj.replacement | ||
Type: `String` | `Function` | ||
string to which the matching string be replace with, or function which return a string for replacing. See the [MDN documentation for String.replace] for details. | ||
string with which the matching string be replaced, or function which returns a string for replacing. See the [MDN documentation for String.replace] for details. | ||
@@ -136,0 +125,0 @@ [html-replace-webpack-plugin]: https://www.npmjs.com/package/html-replace-webpack-plugin |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7015
122