From 78cb9867e1842b0858401628728714c38f03bf2c 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 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; });