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.
 
 
 
 
 
 

34 lines
1.0 KiB

import { initializeApp } from "./main.common";
import { logger } from "./utils/logger";
async function initializeSQLite() {
try {
const isAvailable = await window.electron.sqlite.isAvailable();
if (!isAvailable) {
throw new Error("SQLite plugin not available in main process");
}
logger.info("[Electron] SQLite plugin bridge initialized");
} catch (error) {
logger.error("[Electron] Failed to initialize SQLite plugin bridge:", error);
throw error;
}
}
const platform = process.env.VITE_PLATFORM;
const pwa_enabled = process.env.VITE_PWA_ENABLED === "true";
logger.info("[Electron] Initializing app");
logger.info("[Electron] Platform:", { platform });
logger.info("[Electron] PWA enabled:", { pwa_enabled });
if (pwa_enabled) {
logger.warn("[Electron] PWA is enabled, but not supported in electron");
}
// Initialize app and SQLite
const app = initializeApp();
initializeSQLite().then(() => {
app.mount("#app");
}).catch(error => {
logger.error("[Electron] Failed to initialize app:", error);
});