From 9046e46d129523d115d774ee7584fa6e7189273a Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Sat, 29 Oct 2016 08:41:22 +0200 Subject: [PATCH] Cleaner webpack compilation output --- index.js | 2 +- node_modules/html-webpack-plugin/index.js | 3 +++ node_modules/html-webpack-plugin/lib/loader.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 node_modules/html-webpack-plugin/index.js create mode 100644 node_modules/html-webpack-plugin/lib/loader.js 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