-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Using Web Workers in CRA? #4505
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
Comments
We are hoping to add support for Web Workers and |
We don't support ejected setups but that will most likely work. If not then check out the |
i tried with whatever is provided in the worker-loader config
ERROR |
As I mentioned before, we can't provide support for ejected setups. There are too many unknowns and we have limited time to help. I'd suggest reading over the I'm going to close this now as work on this feature is already underway. |
Ok. thanks for the information.. the above error was from a fresh project... |
Yes, that module is required. You'll have to install it yourself since you've ejected. |
@iansu and as of now in non-ejected CRA there is no way we can use web workers apart from As per #1277 (comment) i don't see how we can ES6 import several modules which i want to process in the worker itself. |
Yes, you can't currently use Web Workers in Create React App until #3934 is merged and released. I'm not really sure what you mean about importing modules into the worker. The worker files are run through |
I am able to use worker-loader in a simple webpack bundled app to import web worker into my APP. But how to do the same thing in CRA, i also want the capability of importing other modules to my web worker to do those tasks inside web worker.
Thanks.
The text was updated successfully, but these errors were encountered: