Advanced

dotenvx.config(overload: true)

Use overload to overwrite the prior set value.

# .env.local
HELLO="Me"
# .env
HELLO="World"
// index.js
require('@dotenvx/dotenvx').config({path: ['.env.local', '.env'], overload: true})

console.log(`Hello ${process.env.HELLO}`)
$ node index.js
[[email protected]] injecting env (1) from .env.local, .env
Hello World