Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary recompile at startup (#20176)
When running the optimizer in dev mode, with new or updated entry files, the optimizer will run once and then a second time immediately after. This is because the webpack watcher uses really loose timestamp checks and since the entry files are created immediately before initializing the optimizer they are considered to be "changed" even when they aren't. To avoid this I've integrated the `webpack.WatchIgnorePlugin` to ignore the entry files from the watcher. This could also be fixed by modifying the timestamps of the files after writing them to disk, but I didn't want extra FS access and it's not actually possible to change the entry files without completely restarting the optimizer.
- Loading branch information