-
Notifications
You must be signed in to change notification settings - Fork 2
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
Request to support third party packages in worker threads #17
Comments
I suspect the problem is related to the usage of third-party library because I am currently adopting moment js in the build. Is it a bug? I am unsure, but I guess one workaround is to abandon third-party package usage when using the useWorkerFunc? |
@johnfung95 A snippet of the use code would help me deduce more of what is going on in this use case. But from what you are describing, it sounds like you are attempting to load a third party resource into the web worker. This won't work because of restrictions with the worker thread. I am currently (slowly) working on a way to transport third party resources. |
@jpwallace22 thanks for your reply. There is not too much going on in my program, basically just a function call with the moment js and return a value. But the code always stops in the moment js usage line.
where it becomes By the way, I tested my program without the moment js and it works just fine. Therefore it is very likely due to the restriction of using third-party resources in the worker thread (as you mentioned). I think I can find a workaround for my problem. |
@johnfung95 I'm working on the docs to transfer third-party resources over to worker as well. I'm ging to switch this over to a feature request, and hopefully I can hop on it soon! |
Same error |
Hi, I came across your package and tried to use the worker function.
However, I received the following error when running.
ReferenceError: moment__WEBPACK_IMPORTED_MODULE_0___default is not defined
Any idea on the resolution?
The text was updated successfully, but these errors were encountered: