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

SharedWorker support #38

Open
Buom01 opened this issue May 23, 2018 · 3 comments
Open

SharedWorker support #38

Buom01 opened this issue May 23, 2018 · 3 comments
Labels
question Further information is requested

Comments

@Buom01
Copy link

Buom01 commented May 23, 2018

Hi,

Does the shared worker feature is planned ?
I also think that it could be nice for your Stockroom's state management system

@developit
Copy link
Owner

developit commented May 25, 2018

I believe worker-loader supports it. Isn't SharedWorker deprecated though?

@developit developit added the question Further information is requested label May 25, 2018
@Buom01
Copy link
Author

Buom01 commented Jun 5, 2018

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

@Lemmmy
Copy link

Lemmmy commented Mar 22, 2021

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:

var w = new Worker(${workerUrl}, { name: ${JSON.stringify(filename)} })

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

No branches or pull requests

3 participants