Skip to content

Commit

Permalink
fix: enable override when reading .env file
Browse files Browse the repository at this point in the history
Changes in `.env.development.local` should override those in `.env`, but this was not working as intended.
  • Loading branch information
Faiz Mustafa committed Nov 1, 2024
1 parent 5faabc0 commit ab97bbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import * as path from 'path'
const nodeEnv = process.env.NODE_ENV || 'development'
console.info(`Configuring ${nodeEnv} build`)
dotenv.config({ path: path.resolve(process.cwd(), '.env') })
dotenv.config({ path: path.resolve(process.cwd(), `.env.${nodeEnv}`) })
dotenv.config({ path: path.resolve(process.cwd(), `.env.${nodeEnv}.local`) })
dotenv.config({ path: path.resolve(process.cwd(), `.env.${nodeEnv}`), override: true })
dotenv.config({ path: path.resolve(process.cwd(), `.env.${nodeEnv}.local`), override: true })

const serverConfig =
nodeEnv === 'development'
Expand Down

0 comments on commit ab97bbb

Please sign in to comment.