[fix] error on HMR with es6 bundles #5862
What kind of change does this PR introduce?
It's a bug fix.
Did you add tests for your changes?
If relevant, link to documentation update:
We notice a bug in webpack HMR during our spike on creating es6 bundles.
This bug was identifed in #5776
Does this PR introduce a breaking change?
Hi， I got an error
Hi @sokra in https://github.com/callstack/haul we use
We can't change mode on demand, that would result in restarting of Webpack which is time-consuming.
After this commit building of WebWorkers as others entries (webpack.entry) does not work any more in dev-mode with hot reload. Actually builds goes success but in browser i see this error 'Uncaught ReferenceError: window is not defined'