Better <html> regex for minified html strings
This commit is contained in:
parent
82ef236cb1
commit
f5842d609e
2
index.js
2
index.js
|
|
@ -300,7 +300,7 @@ HtmlWebpackPlugin.prototype.injectAssetsIntoHtml = function(html, templateParams
|
|||
});
|
||||
// Inject manifest into the opening html tag
|
||||
if (assets.manifest) {
|
||||
html = html.replace(/(<html.*)(>)/i, function (match, start, end) {
|
||||
html = html.replace(/(<html[^>]*)(>)/i, function (match, start, end) {
|
||||
// Append the manifest only if no manifest was specified
|
||||
if (/\smanifest\s*=/.test(match)) {
|
||||
return match;
|
||||
|
|
|
|||
Loading…
Reference in New Issue