Files
Browser/desktop-client-废弃/electron/main.cjs
T
2026-06-25 14:58:52 +08:00

26 lines
534 B
JavaScript

const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow() {
const win = new BrowserWindow({
width: 1400,
height: 900,
backgroundColor: '#0f1115',
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
})
const devUrl = process.env.VITE_DEV_SERVER_URL || 'http://127.0.0.1:5178'
win.loadURL(devUrl)
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})