Fix template path resolving regexp to support loader query parameters (#542)

This commit is contained in:
Peach 2017-01-11 17:09:30 +08:00 committed by Jan Nicklas
parent 82bba6a5f6
commit 78cb9867e1
1 changed files with 1 additions and 1 deletions

View File

@ -580,7 +580,7 @@ HtmlWebpackPlugin.prototype.getFullTemplatePath = function (template, context) {
}
// Resolve template path
return template.replace(
/([!])([^/\\][^!?]+|[^/\\!?])($|\?.+$)/,
/([!])([^/\\][^!?]+|[^/\\!?])($|\?[^!?\n]+$)/,
function (match, prefix, filepath, postfix) {
return prefix + path.resolve(filepath) + postfix;
});