Skip to content
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

Trouble loading WASM modules in worker (with possible solution) #67

Closed
wellcaffeinated opened this issue May 23, 2019 · 3 comments · Fixed by #68
Closed

Trouble loading WASM modules in worker (with possible solution) #67

wellcaffeinated opened this issue May 23, 2019 · 3 comments · Fixed by #68

Comments

@wellcaffeinated
Copy link
Contributor

I believe this loader suffers from the same issue as worker-loader
webpack/webpack#7647

When using a wasm-pack compiled module i get the error message:

TypeError: Cannot read property '.wasm' of undefined

referring to __webpack_require__.w

That worker-loader issue also has a pull request referencing it which does fix my problem... but I'd love to use workerize if possible.

Any chance of getting this fix into workerize-loader pretty please? :)

@wellcaffeinated
Copy link
Contributor Author

I tried it in a fork and it works.
Created pull request

@vincerubinetti
Copy link

vincerubinetti commented Feb 19, 2020

Any update on merging this PR, devs?

I have a situation that I think this would fix. I'm doing some heavy statistical calculations on the front-end, and need them to be on a separate thread. I'm using the ttest package, which uses the distributions package, which uses the cephes package, which is written in webassembly. I'm getting a pretty nondescript compile/webpack error, but it does mention cephes, so based on this issue, I'm guessing the webassembly itself is the problem.

@vincerubinetti
Copy link

Great, thank you so much! Any chance of getting a new published release out with the recently merged PRs? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants