GoogleChromeLabs / worker-plugin

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

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

Closed cwwjsyc closed 4 years ago

cwwjsyc commented 4 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?