add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
Without it, child compilations like those added by "extract-text-webpack-plugin" are not included in stats hash and aren't properly displayed on change.
* Fix MultiCompiler watch mode stats output
Previously, stats would contain stale configuration child stats. This is very confusing, since it looks as if some things are emitted when they shouldn't be.
Add support for making assertions to stats in watch tests.
* Fix test hanging on Windows/Linux
Parallel watchpack's (happens when MultiCompiler is in use) do not emit events in watch tests, unless some timeout is added.
This does not seem to be an issue on macOS.
* Correctly close watcher in watch tests
This fixes macOS build, where changes keep being triggered