diff --git a/src/background.ts b/src/background.ts index 023647fc45..725176cece 100644 --- a/src/background.ts +++ b/src/background.ts @@ -79,7 +79,12 @@ process.on("unhandledRejection", (reason) => { // .envから設定をprocess.envに読み込み const appDirPath = path.dirname(app.getPath("exe")); -dotenv.config({ override: true }); +if (isDevelopment) { + dotenv.config({ override: true }); +} else { + const envPath = path.join(appDirPath, ".env"); + dotenv.config({ path: envPath }); +} protocol.registerSchemesAsPrivileged([ { scheme: "app", privileges: { secure: true, standard: true, stream: true } },