html-webpack-plugin
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -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; |
{ | ||
"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. |
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
28267
265
450