|
|
|
|
|
by omarelb
1038 days ago
|
|
Hey, so we're doing something similar to the solution given above, but without compiling the worker at bundle time. Basically what we're doing is putting the worker code in a string. When you need the worker, you can `import myWorker from ./worker`. At runtime you can create a `Blob` from the string, then create a URL for it using `window.URL.createObjectURL`. It's certainly far from ideal. Since the code lives in a string, there are no compile time errors at all (though you could probably develop without the string form and put it in a string after). But it kinda works. Hope it's what you're looking for. |
|