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

html-webpack-plugin

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-webpack-plugin - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

6

index.js

@@ -261,7 +261,3 @@ 'use strict';

var minify = require('html-minifier').minify;
try {
return minify(html, this.options.minify);
} catch(e) {
Promise.reject(e);
}
return minify(html, self.options.minify);
}

@@ -268,0 +264,0 @@ return html;

2

package.json
{
"name": "html-webpack-plugin",
"version": "2.0.3",
"version": "2.0.4",
"description": "Simplifies creation of HTML files to serve your webpack bundles",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,4 +7,4 @@ HTML Webpack Plugin

webpack bundles. This is especially useful for webpack bundles that include
a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you or supply
your own template (using lodash/ejs templates.
a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you, supply
your own template using lodash templates or use your own loader.

@@ -18,3 +18,2 @@ Installation

Basic Usage

@@ -147,2 +146,19 @@ -----------

If you already have a template loader, you can use it to parse the template.
```javascript
module: {
loaders: [
{ test: /\.hbs$/, loader: "handlebars" }
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Custom template using Handlebars',
template: 'my-index.hbs',
inject: 'body'
})
]
```
Alternatively, if you already have your template's content in a String, you

@@ -159,3 +175,3 @@ can pass it to the plugin using the `templateContent` option:

You can use the lodash/ejs syntax out of the box.
You can use the lodash syntax out of the box.
If the `inject` feature doesn't fit your needs and you want full control over the asset placement use the [default template](https://github.com/ampedandwired/html-webpack-plugin/blob/master/default_index.html)

@@ -162,0 +178,0 @@ as a starting point for writing your own.

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