use async imports since ES6 imports not available without service workers

This commit is contained in:
buzz-lightsnack-2007 2024-05-01 16:54:43 +08:00
parent a013bb1ccf
commit e7677284bf

View file

@ -2,10 +2,12 @@
Shop wisely with AI!
*/
import fc from './fc.js';
import BackgroundCheck from "./background.check.js";
import BackgroundMessaging from "./background.messaging.js";
fc.run();
BackgroundCheck.init();
new BackgroundMessaging();
(async () => {
const fc = (await import(browser.runtime.getURL("scripts/external/watch.js"))).default;
const BackgroundCheck = (await import(browser.runtime.getURL("/scripts/background/background.check.js"))).default;
const BackgroundMessaging = (await import(browser.runtime.getURL("/scripts/background/background.messaging.js"))).default;
fc.run();
BackgroundCheck.init();
new BackgroundMessaging();
})