Skip to content

fix(pwa): Replace closeTag parameter with voidTag for HtmlWebpackPlugin #6518

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

tcitworld
Copy link
Contributor

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 anymore since HtmlWebpackPlugin 4.

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

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

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>
Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@haoqunjiang haoqunjiang merged commit da2c715 into vuejs:dev Jun 9, 2021
@tcitworld tcitworld deleted the fix-pwa-tag-injection branch June 9, 2021 04:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants