From b8df1589c55c313096ff26521123ae84712ae2b3 Mon Sep 17 00:00:00 2001 From: Kurt Harriger Date: Sun, 11 Jan 2015 18:24:11 -0700 Subject: [PATCH] Recompile if file has changed Instruct webpack to watch and recompile when template file has changed. Fixes #5 --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 4923a06..0f63ba3 100644 --- a/index.js +++ b/index.js @@ -29,6 +29,7 @@ HtmlWebpackPlugin.prototype.apply = function(compiler) { if (!templateFile) { templateFile = path.join(__dirname, 'default_index.html'); } + compiler.fileDependencies.push(templateFile); fs.readFile(templateFile, 'utf8', function(err, htmlTemplateContent) { if (err) {