Fix build

This commit is contained in:
Geomitron
2023-12-25 14:34:19 -06:00
parent d904709086
commit 6bb9e02485
5 changed files with 137 additions and 203 deletions

View File

@@ -127,7 +127,7 @@ function createBrowserWindow(windowState: windowStateKeeper.State) {
}
async function loadWindow(retries = 0) {
if (retries > 10) { throw new Error('Angular frontend did not load') }
if (retries > 10) { throw new Error(`Angular frontend did not load.\nLoad URL: ${getLoadUrl()}`) }
try {
await mainWindow.loadURL(getLoadUrl())
} catch (err) {
@@ -142,7 +142,7 @@ async function loadWindow(retries = 0) {
function getLoadUrl() {
return url.format({
protocol: isDevBuild ? 'http:' : 'file:',
pathname: isDevBuild ? '//localhost:4200/' : path.join(__dirname, '..', 'index.html'),
pathname: isDevBuild ? '//localhost:4200/' : path.join(__dirname, '..', '..', 'angular', 'index.html'),
slashes: true,
})
}