mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 09:11:06 +00:00
fix: fix builds not lazy loadin
This commit is contained in:
+14
-11
@@ -1,7 +1,6 @@
|
||||
import "./index.css";
|
||||
import Settings from "./pages/settings.svelte";
|
||||
import IconFamily from "@/resources/fonts/IconFamily.woff";
|
||||
import browser from "webextension-polyfill";
|
||||
import { resolveExtensionAssetUrl } from "@/lib/extensionAssetUrl";
|
||||
import renderSvelte from "./main";
|
||||
import { initializeSettingsState } from "@/seqta/utils/listeners/SettingsState";
|
||||
@@ -24,14 +23,18 @@ function InjectCustomIcons() {
|
||||
|
||||
const mountPoint = document.getElementById("app");
|
||||
if (!mountPoint) {
|
||||
console.error("Mount point #app not found");
|
||||
throw new Error("Mount point #app not found");
|
||||
}
|
||||
// In production, Rollup may put this entry in a shared chunk that content
|
||||
// scripts load via `import("@/interface/main")`. Only the settings page
|
||||
// has `#app` — never throw on SEQTA tabs.
|
||||
verboseInfo(
|
||||
"[BetterSEQTA+] Settings bootstrap skipped (no #app — not the settings page)",
|
||||
);
|
||||
} else {
|
||||
InjectCustomIcons();
|
||||
|
||||
InjectCustomIcons();
|
||||
|
||||
(async () => {
|
||||
await initializeSettingsState();
|
||||
initVerboseLogging();
|
||||
renderSvelte(Settings, mountPoint, { standalone: true });
|
||||
})();
|
||||
void (async () => {
|
||||
await initializeSettingsState();
|
||||
initVerboseLogging();
|
||||
renderSvelte(Settings, mountPoint, { standalone: true });
|
||||
})();
|
||||
}
|
||||
Reference in New Issue
Block a user