-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow us to exclude certain files from the HMR #1595
Comments
@aprilmintacpineda problem in |
web worker's can't use |
/cc @spencer-brown sorry for delay, maybe you can create minimum reproducible test repo, it is allow other developers make fast test and search problem place to fix |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@masx200 use English language, first warning |
Here is a "minimal" example built with create-react-app: https://github.com/kumar303/worker-loader-issue174 The readme has instructions. The app gives me: Other folks have had luck with setting |
Hi there 👋 This is my solution to disable HMR for workers: |
Fixed in |
Code
Sorry for not posting my config, I don't think it's related to that.
I'm using worker-loader which basically allows us to turn certain files into separate web worker with fallback capability for devices that does not support web workers.
But once your server starts up, you'll see this error on the console:
The error is coming from the web worker because
window
is not available on web workers.Turning off HMR will fix the error BUT I want to be able to use HMR for other stuff. Maybe allow us to provide an option where we could exclude certain files from HMR?
The text was updated successfully, but these errors were encountered: