HRM runtime calls window.location.reload()
, breaks in in web worker context
#3076
Labels
window.location.reload()
, breaks in in web worker context
#3076
🐛 bug report
HMR
update
events are currently causingReferenceError: window does not exist
in browser-targeted apps that use web workers.This appears to be happening because
hrm-runtime.js
makes reference to thewindow
global, which doesn't exist in a web worker context:🤔 Expected Behavior
No error should be encountered by web worker code when an HMR update occurs.
😯 Current Behavior
ReferenceError: window does not exist
💻 Code Sample
npm install && npm start
src/index.js
to trigger HMRupdate
.ReferenceError: window is not defined
🌍 Your Environment
The text was updated successfully, but these errors were encountered: