You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
import { initializeApp } from "./main.common";
|
|
import { logger } from "./utils/logger";
|
|
|
|
const platform = process.env.VITE_PLATFORM;
|
|
const pwa_enabled = process.env.VITE_PWA_ENABLED === "true";
|
|
|
|
// Only log SharedArrayBuffer info for web platform in development
|
|
if (platform === "web" && process.env.NODE_ENV !== "production") {
|
|
logger.debug(
|
|
`[SharedArrayBuffer] Available: ${typeof SharedArrayBuffer !== "undefined"}`,
|
|
);
|
|
logger.debug(`[Browser] User Agent: ${navigator.userAgent}`);
|
|
logger.debug(
|
|
`[Headers] Check COOP/COEP in Network tab if SharedArrayBuffer is false`,
|
|
);
|
|
}
|
|
|
|
// Only import service worker for web builds
|
|
if (pwa_enabled) {
|
|
import("./registerServiceWorker"); // Web PWA support
|
|
}
|
|
|
|
const app = initializeApp();
|
|
|
|
// Note: Worker initialization is now handled by WebPlatformService
|
|
// This ensures single-point database access and prevents double migrations
|
|
if (platform === "web" || platform === "development") {
|
|
logger.debug(
|
|
"[Web] Database initialization will be handled by WebPlatformService",
|
|
);
|
|
} else {
|
|
logger.debug("[Web] SQL not initialized for platform", { platform });
|
|
}
|
|
|
|
app.mount("#app");
|
|
|