Open
Description
Hello all and thanks for this lib :)
I can successfully start a Worker and SharedWorker from my react app, but I would like to initiate the SharedWorker from a Worker insted, so that I do not need to pass values around too much.
worker.js
const sharedWorkerInstance = new SharedWorker(
'../sharedWorker/webSocket-shared-worker.ts',
{ type: 'module' }
);
webpack.config.js
new WorkerPlugin({
sharedWorker: true,
}),
but unfortunately I get ReferenceError: SharedWorker is not defined
any ideas? thanks!
Notes: latest comlink + worker-plugin
Metadata
Metadata
Assignees
Labels
No labels