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.6 to 2.2.8

8

index.js

@@ -39,4 +39,4 @@ function HtmlReplaceWebpackPlugin(options)

{
// htmlData = htmlData.replace(option.pattern, option.replacement) // v2.2.4@npmjs.com
htmlData = htmlData.split(option.pattern).join(option.replacement) // v2.2.5@npmjs.com
// htmlData = htmlData.replace(option.pattern, option.replacement)
htmlData = htmlData.split(option.pattern).join(option.replacement)
}

@@ -50,3 +50,3 @@ })

{
var self = this
var _this = this
compiler.plugin('compilation', function(compilation)

@@ -58,3 +58,3 @@ {

{
htmlPluginData.html = self.replace(htmlPluginData.html)
htmlPluginData.html = _this.replace(htmlPluginData.html)
callback(null, htmlPluginData)

@@ -61,0 +61,0 @@ })

{
"name": "html-replace-webpack-plugin",
"version": "2.2.6",
"version": "2.2.8",
"description": "A Webpack plugin for replace HTML contents with custom pattern string or regex.",

@@ -26,3 +26,6 @@ "main": "index.js",

},
"homepage": "https://github.com/iminif/html-replace-webpack-plugin#readme"
"homepage": "https://github.com/iminif/html-replace-webpack-plugin#readme",
"notes": {
"2.2.7": "unpublished@2017-09-15 11:22"
}
}

@@ -12,3 +12,3 @@ # [html-replace-webpack-plugin]

```shell
npm install html-replace-webpack-plugin
npm i -D html-replace-webpack-plugin
```

@@ -23,2 +23,15 @@

// file types & file links
const resource = {
js: {'bootstrap': '//cdn/bootstrap/bootstrap.min.js'},
css: {'bootstrap': '//cdn/bootstrap/bootstrap.min.css'},
img:{'the-girl': '//cdn/img/the-girl.jpg'}
}
const tpl = {
img: '<img src="%s">',
css: '<link rel="stylesheet" type="text/css" href="%s">',
js: '<script type="text/javascript" src="%s"></script>'
}
module.exports = {

@@ -56,15 +69,2 @@ // Definition for Webpack plugins

}
// file types & file links
const resource = {
js: {'bootstrap': '//cdn/bootstrap/bootstrap.min.js'},
css: {'bootstrap': '//cdn/bootstrap/bootstrap.min.css'},
img:{'the-girl': '//cdn/img/the-girl.jpg'}
}
const tpl = {
img: '<img src="%s">',
css: '<link rel="stylesheet" type="text/css" href="%s">',
js: '<script type="text/javascript" src="%s"></script>'
}
```

@@ -71,0 +71,0 @@

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