Uncaught NetworkError for cron-parser
qmn1711 opened this issue · comments
I want to use cron-parser in my worker but useWorker can't load it, even with the example code like this:
const [sortWorker] = useWorker(sortNumbers, {
remoteDependencies: [
'https://cdn.jsdelivr.net/npm/cron-parser@4.6.0/lib/parser.min.js',
],
});
Message of ErrorEvent:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.jsdelivr.net/npm/cron-parser@4.6.0/lib/parser.min.js' failed to load."
I can run successfully with the remoteDependencies example. I'm not sure whether it's problem of useWorker or cron-parser bundling.