numical/script-ext-html-webpack-plugin

Resource hint elements have unnecessary </link> closing tag

skisor opened this issue · 5 comments

Try

new ScriptExtHtmlWebpackPlugin({
  preload: {
    test: ...,
    chunks: 'async'
  }
}),

Expected

<link rel="preload" href="..." as="script">

Actual

<link rel="preload" href="..." as="script"></link>

"script-ext-html-webpack-plugin" version: 1.7.1
"html-webpack-plugin": 2.24.1
"webpack": 2.2.1
"node": 6.2.0

W3C says:

In HTML the tag has no end tag.

https://www.w3schools.com/tags/tag_link.asp

Fixed on v1.7.2

lacoe commented

I still receive generated link ending with /> If I change the selfClosingTag to true in resource-hints.js file the generated link is OK.

HI @lacoe - selfClosingTag has been true in resource-hints.js since 1.7.2. What version are you using?

I am also seeing the same issue. What even worse, the closing slash causes html-webpack-pug-plugin fail to work. For me, the generated links are OK if I changeselfClosingTag to false. I am using version 2.0.1.

Hello - I'm sorry to say that this plugin is no longer being maintained. I have tried to close all issues ahead of doing this but instead have found that the issue list just keeps growing. I simply do not have the time to keep up. Sorry.
Please keep an eye on the README where I will record anyone who forks this repo with the intention to supporting it in the future.