Recompile if file has changed

Instruct webpack to watch and recompile when template file has changed.

Fixes #5
This commit is contained in:
Kurt Harriger 2015-01-11 18:24:11 -07:00
parent ca0599e03b
commit b8df1589c5
1 changed files with 1 additions and 0 deletions

View File

@ -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) {