Recompile if file has changed
Instruct webpack to watch and recompile when template file has changed. Fixes #5
This commit is contained in:
parent
ca0599e03b
commit
b8df1589c5
1
index.js
1
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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue