diff --git a/index.js b/index.js index acab400..b1d7fba 100644 --- a/index.js +++ b/index.js @@ -595,7 +595,7 @@ HtmlWebpackPlugin.prototype.createHtmlTag = function (tagDefinition) { HtmlWebpackPlugin.prototype.getFullTemplatePath = function (template, context) { // If the template doesn't use a loader use the lodash template loader if (template.indexOf('!') === -1) { - template = require.resolve('./lib/loader.js') + '!' + path.resolve(context, template); + template = 'html-webpack-plugin/lib/loader.js!' + path.resolve(context, template); } // Resolve template path return template.replace( diff --git a/node_modules/html-webpack-plugin/index.js b/node_modules/html-webpack-plugin/index.js new file mode 100644 index 0000000..062a8ae --- /dev/null +++ b/node_modules/html-webpack-plugin/index.js @@ -0,0 +1,3 @@ +// This file is only be used for internal webpack html plugin unit testing. +// To simulates that the html-webpack-plugin is installed in the node_modules directory. +module.exports = require('../../'); \ No newline at end of file diff --git a/node_modules/html-webpack-plugin/lib/loader.js b/node_modules/html-webpack-plugin/lib/loader.js new file mode 100644 index 0000000..a9f1558 --- /dev/null +++ b/node_modules/html-webpack-plugin/lib/loader.js @@ -0,0 +1,3 @@ +// This file is only be used for internal webpack html plugin unit testing. +// To simulates that the html-webpack-plugin is installed in the node_modules directory. +module.exports = require('../../../lib/loader.js'); \ No newline at end of file