setup electron app for production

This commit is contained in:
talksik
2026-04-13 10:03:23 -07:00
parent 1579de8c6d
commit 106254ef83
13 changed files with 96 additions and 21 deletions
+13
View File
@@ -0,0 +1,13 @@
// Shared Vite `define` block that injects the build-time __APP_ENV__ constant
// consumed by src/config/env.ts. Sourced from process.env.APP_ENV (default 'dev').
const raw = process.env.APP_ENV ?? "dev";
if (raw !== "dev" && raw !== "prod") {
throw new Error(`APP_ENV must be "dev" or "prod", got: ${raw}`);
}
export const appEnv = raw;
export const defineEnv = {
__APP_ENV__: JSON.stringify(appEnv),
};