surma/rollup-plugin-off-main-thread

`SharedWorker` support?

jespertheend opened this issue · 1 comments

I'd like to make use of this plugin but I'm using a SharedWorker
Not sure if SharedWorkers will need special treatment or if they can be taken care of with the existing logic.

I just replaced all instances of new Worker with new SharedWorker in index.js and everything seems to be working as expected.
Implementing this for real will be a bit more difficult because it has to account for both Worker and SharedWorker at the same time.
I might be able to do a PR if you like.