Skip to content

Commit

Permalink
fix(pwa): Replace closeTag parameter with voidTag for HtmlWebpackPlug…
Browse files Browse the repository at this point in the history
…in (#6518)

HtmlWebpackPlugin has a voidTag parameter that needs to be set to true
so that both <link> and <meta> are treated as void elements (with no
contents). The closeTag parameter doesn't exist.

https://github.com/jantimon/html-webpack-plugin/blob/570f735c237d4a03a65622cfe64652431aca4132/typings.d.ts#L280
https://html.spec.whatwg.org/multipage/syntax.html#void-elements

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld authored Jun 9, 2021
1 parent 820b9b7 commit da2c715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli-plugin-pwa/lib/HtmlPwaPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ module.exports = class HtmlPwaPlugin {
}
}

function makeTag (tagName, attributes, closeTag = false) {
function makeTag (tagName, attributes, voidTag = true) {
return {
tagName,
closeTag,
voidTag,
attributes
}
}
Expand Down

0 comments on commit da2c715

Please sign in to comment.