Open cpatti97100 opened 3 years ago
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
ReferenceError: SharedWorker is not defined
any ideas? thanks!
Notes: latest comlink + worker-plugin
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
webpack.config.js
but unfortunately I get
ReferenceError: SharedWorker is not defined
any ideas? thanks!
Notes: latest comlink + worker-plugin