This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/electron/windows/primary.ts
2023-08-30 01:46:33 -04:00

24 lines
No EOL
725 B
TypeScript

import {BrowserWindow} from "electron"
import {meta} from '../../configuration/app'
let mainWindow : BrowserWindow
module.exports = {
launch: function() {
mainWindow = new BrowserWindow({
title: meta.name,
width: 500,
height: 500,
webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true
}
})
// Load Content
if (process.env.NODE_ENV === "development") {
mainWindow.loadURL('http://localhost:2023')
} else if (process.env.NODE_ENV === 'production') {
mainWindow.loadFile('.build/output/astro/index.html')
}
}
}