diff --git a/app.config.ts b/app.config.ts index 9ceec78..1a8d7af 100644 --- a/app.config.ts +++ b/app.config.ts @@ -61,6 +61,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({ }, experiments: { typedRoutes: true, + baseUrl: '/', }, android: { version: packageJSON.version, @@ -88,6 +89,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({ web: { favicon: './assets/favicon.png', bundler: 'metro', + output: 'static', }, plugins: [ [ diff --git a/electron/main.js b/electron/main.js index f064c2c..c87d16d 100644 --- a/electron/main.js +++ b/electron/main.js @@ -19,12 +19,14 @@ function createWindow() { // In development, load the local Expo web server // In production, load the built index.html - const startUrl = isDev - ? 'http://localhost:8081' - : `file://${path.join(__dirname, '../dist/index.html')}`; - - console.log('Loading URL:', startUrl); - mainWindow.loadURL(startUrl); + if (isDev) { + console.log('Loading dev URL: http://localhost:8081'); + mainWindow.loadURL('http://localhost:8081'); + } else { + const indexPath = path.join(__dirname, '../dist/index.html'); + console.log('Loading file:', indexPath); + mainWindow.loadFile(indexPath); + } if (isDev) { mainWindow.webContents.openDevTools();