Merge pull request #57 from relayfoods/master

Fix existing manifest regex test
This commit is contained in:
Jan Nicklas 2015-06-10 23:07:45 +02:00
commit 43aa8a3984
1 changed files with 2 additions and 2 deletions

View File

@ -300,9 +300,9 @@ 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 (match.test(/\smanifest\s*=/)) {
if (/\smanifest\s*=/.test(match)) {
return match;
}
return start + ' manifest="' + assets.manifest + '"' + end;