From 1b4f8efe94e41396e4a6f6d41cbdda94ff67bfbc Mon Sep 17 00:00:00 2001 From: Peach Date: Wed, 11 Jan 2017 17:09:30 +0800 Subject: [PATCH] Fix template path resolving regexp to support loader query parameters (#542) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; });