Skip to content

Commit db94c85

Browse files
committed
feat: load .env overrides
1 parent fc6ae41 commit db94c85

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
# the webpack config using the `EnvironmentPlugin`.
66
# ------------------------------------------------------------------------------
77

8+
# The environment the app is running in.
9+
# Generally, this should stay as 'production' so that webpack and the bundlers
10+
# know to optimize the build for best performance.
11+
NODE_ENV="production"
12+
813
# App-specific environment variable.
914
# Similar purpose as NODE_ENV but for our own use, and at times
1015
# may not be in sync with the NODE_ENV the app is running under.

electron/main/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { config as initializeDotenv } from 'dotenv';
1+
import { config as initializeDotenv } from 'dotenv-flow';
22
import { initializeLogging } from './logger';
33
import { initializeSentry } from './sentry';
44

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"@sentry/electron": "^4.14.0",
6868
"@sentry/nextjs": "^7.77.0",
6969
"dotenv": "^16.3.1",
70+
"dotenv-flow": "^4.0.1",
7071
"electron-is-dev": "^2.0.0",
7172
"electron-log": "^5.0.0",
7273
"electron-serve": "^1.2.0",

yarn.lock

+8-1
Original file line numberDiff line numberDiff line change
@@ -4176,7 +4176,14 @@ dotenv-expand@^5.1.0:
41764176
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
41774177
integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==
41784178

4179-
dotenv@^16.3.1:
4179+
dotenv-flow@^4.0.1:
4180+
version "4.0.1"
4181+
resolved "https://registry.yarnpkg.com/dotenv-flow/-/dotenv-flow-4.0.1.tgz#28686d1a454fb9d350e50a175375965a30492c30"
4182+
integrity sha512-HuCQ487bSA43mtlxdWpyk5jt5Lljy+v1I8y/2l96gtjSve9p3OvJZCCOhQnz2hY4VhLogFfXpY20zBygMwaydA==
4183+
dependencies:
4184+
dotenv "^16.0.0"
4185+
4186+
dotenv@^16.0.0, dotenv@^16.3.1:
41804187
version "16.3.1"
41814188
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
41824189
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

0 commit comments

Comments
 (0)