diff --git a/index.js b/index.js index 9df2643..fd274c4 100644 --- a/index.js +++ b/index.js @@ -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; });