Closed MuffinK closed 5 years ago
Hey @MuffinK!
Yeah, that warning message is unrelated to the issue you describe here. Sounds pretty severe. I will have a look.
I moved the issue into the threads-plugin
repo: andywer/threads-plugin#6
Good news! The original repo that this one is based on already has a fix for that: GoogleChromeLabs/worker-plugin#35
Will port the fix now...
Fix has been published as v1.1.0
I have tried the update, the bug is fixed, but another warn message is shown.
WARNING in No instantiations of threads.js workers found.
Please check that:
1. You have configured Babel / TypeScript to not transpile ES modules
2. You import `Worker` from `threads` where you use it
For more details see: https://github.com/andywer/threads-plugin
Thanks again for the bug fix and your awesome library😄
Hmm, that message is only shown if the plugin ran, but didn't find any new Worker()
expression.
Is the code you are working on open-source? Would be interested to check why you see that message...
Or do you run webpack multiple times on different entrypoints maybe?
Hmm, that message is only shown if the plugin ran, but didn't find any
new Worker()
expression.Is the code you are working on open-source? Would be interested to check why you see that message...
Or do you run webpack multiple times on different entrypoints maybe?
I'm sorry, It was my fault. Everything work fine now ,Thank you.
When using two worker in one js file, it seems webpack will resolve them to the same worker js file ?
A little demo shown as below:
index.js
webpack.config.js
add.js
sub.js
PS. webpack shows this warn message when bundleing:
Does this warning matters ? I have read this issue, and changed webpack.config.js to
The warn message is gone, but the bundle result is still wrong.
Hoping for your response Thank you