File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11Change History
22==============
33
4+ v2.28.0
5+ ---
6+ * Backport 3.x void tag for plugin authors
7+
48v2.27.1
59---
610* Revert 2.25.0 loader resolving
Original file line number Diff line number Diff line change @@ -594,9 +594,12 @@ HtmlWebpackPlugin.prototype.createHtmlTag = function (tagDefinition) {
594594 }
595595 return attributeName + '="' + tagDefinition . attributes [ attributeName ] + '"' ;
596596 } ) ;
597- return '<' + [ tagDefinition . tagName ] . concat ( attributes ) . join ( ' ' ) + ( tagDefinition . selfClosingTag ? '/' : '' ) + '>' +
597+ // Backport of 3.x void tag definition
598+ var voidTag = tagDefinition . voidTag !== undefined ? tagDefinition . voidTag : ! tagDefinition . closeTag ;
599+ var selfClosingTag = tagDefinition . voidTag !== undefined ? tagDefinition . voidTag && this . options . xhtml : tagDefinition . selfClosingTag ;
600+ return '<' + [ tagDefinition . tagName ] . concat ( attributes ) . join ( ' ' ) + ( selfClosingTag ? '/' : '' ) + '>' +
598601 ( tagDefinition . innerHTML || '' ) +
599- ( tagDefinition . closeTag ? '</' + tagDefinition . tagName + '>' : ' ') ;
602+ ( voidTag ? '' : ' </' + tagDefinition . tagName + '>' ) ;
600603} ;
601604
602605/**
Original file line number Diff line number Diff line change 11{
22 "name" : " html-webpack-plugin" ,
3- "version" : " 2.27.1 " ,
3+ "version" : " 2.28.0 " ,
44 "description" : " Simplifies creation of HTML files to serve your webpack bundles" ,
55 "main" : " index.js" ,
66 "files" : [
You can’t perform that action at this time.
0 commit comments