-
Notifications
You must be signed in to change notification settings - Fork 86
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
Version 1.2.0 does not export function on worker instance in production mode #85
Comments
I was going to open a ticket too :D, all I can say, is that this is happening to me too. I can't see any exported function in my worker instance. But I could see everything in 1.1.0. That said, happy to see this project maintained, and hope it will work with webpack 5 in near future. |
I have the same issue. I forced |
Yikes! I'll take a look. |
You could basically do
but that is a quick and dirty fix.. |
A fix has been published in 1.2.1. Thanks all. |
Whenever there is a syntax error in the web worker file, you will see a "x is not a function" error first. So if you land here from google, check the web worker file first, problem on workerize was indeed fixed. |
I just upgraded to workerize-loader v1.2.0
When the worker instance is created, it does not have the exported functions attached to it.
All this only happens in the production build (development server works fine)
This the the output of
console.log(instance)
in development server (parseFormula
is the exported function):When creating a production build, this is the output:
I have a suspicion it might have something to do with this commit but I don't know enough about the project.
I call the worker like this
the worker function is defined like this
I know I am using the API differently than described in the README, however all of this worked in 1.1.0 and I also converted the examples exactly like described and it still did not export the function in 1.2.0.
The text was updated successfully, but these errors were encountered: