diff --git a/build-tools.ts b/build-tools.ts index c5cf1c79..df6be5ba 100644 --- a/build-tools.ts +++ b/build-tools.ts @@ -110,13 +110,7 @@ export async function build(variant: BuildVariant) { consola.start("Starting Electron process..."); const electronExec = path.resolve(import.meta.dirname, "node_modules", "electron", "cli.js"); - const proc = child_process.fork(electronExec, ["."], { - env: { - ...process.env, - ALICORN_DEV_SERVER: "1" - }, - cwd: outputDir - }); + const proc = child_process.fork(electronExec, ["."], { cwd: outputDir }); process.once("SIGINT", () => { consola.info("Closing Electron app..."); diff --git a/src/main/main-env.d.ts b/src/main/main-env.d.ts index cc729f25..f45daf16 100644 --- a/src/main/main-env.d.ts +++ b/src/main/main-env.d.ts @@ -1,7 +1,6 @@ declare global { namespace NodeJS { interface ProcessEnv { - ALICORN_DEV_SERVER?: string; ALICORN_CONFIG_PATH?: string; ALICORN_STORE_PATH?: string; } diff --git a/src/main/main.ts b/src/main/main.ts index 70fa44a2..cf80f539 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -86,7 +86,7 @@ async function main() { console.log("Loading window contents..."); // Load renderer from dev server (dev) or file (prod). - if (import.meta.env.AL_DEV && process.env.ALICORN_DEV_SERVER) { + if (import.meta.env.AL_DEV) { const devServerURL = `http://localhost:${import.meta.env.AL_DEV_SERVER_PORT}/`; console.log(`Picked up dev server URL: ${devServerURL}`); await mainWindow.loadURL(devServerURL);