You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed - the existence of importScripts just depends on how you load the module. If it's a Classic Worker (new Worker(url)), importScripts() should work fine. If it's a Module Worker (new Worker(url, {type:'module'})), you'll want to use import() instead.
(I get the impression this question was prompted by TypeScript making it seem like importScripts() isn't defined - TypeScript doesn't know that you're in a Worker context unless you tell it you are, which requires moving your worker code into a directory with its own tsconfig.js that replaces DOM typings with Worker ones. It's... a rough edge)
is there a way to use the WorkerGlobalScope.importScripts() method with workerize-loader?
The text was updated successfully, but these errors were encountered: