Open Buom01 opened 6 years ago
I believe worker-loader
supports it. Isn't SharedWorker deprecated though?
worker-loader
don't seem to support it: https://github.com/webpack-contrib/worker-loader/search?q=shared
Else I don't think that SharedWorker are deprecated, but to be honest I don't used it a lot:
There are not deprecation mentions on: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker
I think that I will try to implement it in free time
It looks like worker-loader now implements this by letting you change the constructor name: https://github.com/webpack-contrib/worker-loader/blob/08fa5c5c9984b9dda46c422d65ef83c92f2ef368/README.md#worker
I don't know if a similar thing could be applied to workerize-loader (given that SharedWorkers require you to use .port
) somewhere around here:
https://github.com/developit/workerize-loader/blob/7f649ef9857010449707d191a12e3abaae38c069/src/index.js#L158
Hi,
Does the shared worker feature is planned ? I also think that it could be nice for your Stockroom's state management system