Release 2.28.0

This commit is contained in:
Jan Nicklas 2017-01-29 14:48:23 +01:00
parent 9bdb6189ea
commit 73a01bdcaf
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,10 @@
Change History
==============
v2.28.0
---
* Backport 3.x void tag for plugin authors
v2.27.1
---
* Revert 2.25.0 loader resolving

View File

@ -594,9 +594,12 @@ HtmlWebpackPlugin.prototype.createHtmlTag = function (tagDefinition) {
}
return attributeName + '="' + tagDefinition.attributes[attributeName] + '"';
});
return '<' + [tagDefinition.tagName].concat(attributes).join(' ') + (tagDefinition.selfClosingTag ? '/' : '') + '>' +
// Backport of 3.x void tag definition
var voidTag = tagDefinition.voidTag !== undefined ? tagDefinition.voidTag : !tagDefinition.closeTag;
var selfClosingTag = tagDefinition.voidTag !== undefined ? tagDefinition.voidTag && this.options.xhtml : tagDefinition.selfClosingTag;
return '<' + [tagDefinition.tagName].concat(attributes).join(' ') + (selfClosingTag ? '/' : '') + '>' +
(tagDefinition.innerHTML || '') +
(tagDefinition.closeTag ? '</' + tagDefinition.tagName + '>' : '');
(voidTag ? '' : '</' + tagDefinition.tagName + '>');
};
/**

View File

@ -1,6 +1,6 @@
{
"name": "html-webpack-plugin",
"version": "2.27.1",
"version": "2.28.0",
"description": "Simplifies creation of HTML files to serve your webpack bundles",
"main": "index.js",
"files": [