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
I'm using tsdav, which itself depends on cross-fetch in a service worker of a webextension, which is bundled with Vite.
However, it seems that when the service worker is being bundled, cross-fetch does not work well.
An outputs the following error: TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Illegal invocation
Hi!
I'm using tsdav, which itself depends on cross-fetch in a service worker of a webextension, which is bundled with Vite.
However, it seems that when the service worker is being bundled, cross-fetch does not work well.
An outputs the following error: TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Illegal invocation
Many thanks!
package.json
vite.config
background-script
import browser from 'webextension-polyfill';
import { DAVClient } from 'tsdav';
import { createEvent } from 'ics';
import _ from 'lodash';
// import { DateTime } from "luxon";
console.log('Background Script');
The text was updated successfully, but these errors were encountered: