Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-replace-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-replace-webpack-plugin - npm Package Compare versions

Comparing version 2.2.1 to 2.2.3

3

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc