Closed pcbuildpluscoding closed 1 year ago
vite has builtin webworker and sharedworker support
import MyWorker from './worker?sharedworker'
const worker = new MyWorker()
Or to inline the worker as base64 strings
import MyWorker from './worker?worker&inline'
const worker = new MyWorker()
Hi I'm trying to adapt your rollup-typescript-webworkers project from a web-worker type to a shared-worker WorkerFactory type My attempt to update the workers.d.ts is apparently incorrect =>
OR my attempt to define the 'shared-worker' plugin option in rollup.config.js is wrong =>
I also import the shared-worker module into index.ts =>
When I run yarn build:all I get this error =>
I assume this means the workerLoader plugin is not loading the shared-worker dependency. Correct? Your readme content does not actually show an example of a workerLoader configuration. The related section shows this =>
Why not add an example that shows the expected syntax? Any help with my issue is appreciated