diff --git a/src/cmd/run.js b/src/cmd/run.js index d95b32168a..fbbfffb555 100644 --- a/src/cmd/run.js +++ b/src/cmd/run.js @@ -206,8 +206,6 @@ export default async function run( if (noReload) { log.info('Automatic extension reloading has been disabled'); } else { - log.info('The extension will reload if any source file changes'); - reloadStrategy({ extensionRunner, sourceDir, @@ -217,6 +215,8 @@ export default async function run( ignoreFiles, noInput, }); + + log.info('The extension will reload if any source file changes'); } return extensionRunner; diff --git a/src/watcher.js b/src/watcher.js index d4a784b474..c2e4bde76a 100644 --- a/src/watcher.js +++ b/src/watcher.js @@ -63,7 +63,9 @@ export default function onSourceChange({ files: watchedFiles, directories: watchedDirs, missing: [], - startTime: Date.now(), + // startTime: Date.now(), is explicitly NOT set because it causes onChange + // to be emitted if the files were created shortly before now! + // See https://github.com/webpack/watchpack/issues/295 }); // TODO: support interrupting the watcher on Windows.