GoogleChromeLabs / worker-plugin

👩‍🏭 Adds native Web Worker bundling support to Webpack.
https://npm.im/worker-plugin
Apache License 2.0
1.91k stars 79 forks source link

Failed to using 'importScripts' on *worker.js #91

Closed cwwjsyc closed 3 years ago

cwwjsyc commented 3 years ago

Vue Cli . I want use put some utility methos(e.g fetch indexeddb ...) in a tool.js And then use self.importScipts add tool.js to *worker.js. but have error like: Uncaught TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts().

LifeIsStrange commented 2 years ago

@cwwjsyc what solved your issue?