andywer / threads-plugin

📦 Makes your threads.js code build with webpack out of the box.
Apache License 2.0
28 stars 6 forks source link

Uncaught TypeError: Failed to construct 'Worker' #5

Closed JuliaCBrown closed 4 years ago

JuliaCBrown commented 5 years ago

Hey! I'm getting this same issue from the parent library: https://github.com/GoogleChromeLabs/worker-plugin/issues/2

It looks like you modified the area that had the fix in this commit. https://github.com/andywer/threads-plugin/commit/2d122f07e2e1e6d6ef535fb41a75474855f78817

Could the fix be added back in?

andywer commented 5 years ago

Hey @JuliaCBrown, thanks for pointing that out!

I am terribly sorry for the delay, I just saw your issue. For some reason I wasn't automatically watching the repository...

The issue in the parent repo was fixed by that commit: https://github.com/GoogleChromeLabs/worker-plugin/commit/9178a29a2a91ffe8c2dc1bf192117f0ed334a0a7

I don't see how the commit solved the presence of the unsupported option prop, though. I think I removed the lines of code in question for a good reason, can't tell which one anymore.

Any ideas? Don't have the time to debug in detail right now, unfortunately.

Maybe you gave up on that issue by now - I hope not 😉 If you found another solution in the meantime, let me know!

JuliaCBrown commented 5 years ago

Sorry for the delay myself! I was on vacation for a while and I'm finally getting caught back up with all my emails.

I'm not totally sure but I think maybe https://github.com/GoogleChromeLabs/worker-plugin/commit/9178a29a2a91ffe8c2dc1bf192117f0ed334a0a7#diff-1fdf421c05c1140f6d71444ea2b27638R55 this part is the relevant part? Where it is saving the type prop and then passing that along on lines 75/77. I've not actually been looking into this recently because adding in worker pools is a non-critical tech debt item, but if this is the issue then I'd love to get back into it.

andywer commented 4 years ago

I think this issue might already be fixed. Feel free to re-open or leave a comment here if I am wrong 😉