diff --git a/index.js b/index.js index a8e86d4..715701e 100644 --- a/index.js +++ b/index.js @@ -606,7 +606,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; });