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! Shop wisely with AI!
*/ */
import fc from './fc.js'; (async () => {
import BackgroundCheck from "./background.check.js"; const fc = (await import(browser.runtime.getURL("scripts/external/watch.js"))).default;
import BackgroundMessaging from "./background.messaging.js"; 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(); fc.run();
new BackgroundMessaging(); BackgroundCheck.init();
new BackgroundMessaging();
})