Bring back template path regex.

This is untested code!
This commit is contained in:
Kees Kluskens 2015-09-08 17:03:18 +02:00 committed by Jan Nicklas
parent 2c028a95c0
commit 668ab7ffb3
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ function HtmlWebpackPlugin(options) {
if(this.options.template.indexOf('!') === -1) {
this.options.template = require.resolve('./loader.js') + '!' + path.resolve(this.options.template);
}
// Resolve template path
this.options.template = this.options.template.replace(
/(\!)([^\/\\][^\!\?]+|[^\/\\!?])($|\?.+$)/,
function(match, prefix, filepath, postfix) {
return prefix + path.resolve(filepath) + postfix;
});
}
HtmlWebpackPlugin.prototype.apply = function(compiler) {