config({ encoding: … })

Read UTF-8 environment files

Node.js config

dotenvx.config({ encoding: 'utf8' })

Usage

Only utf8 and utf-8 are accepted. Other encoding values throw TypeError.


const dotenvx = require('@dotenvx/dotenvx')
dotenvx.config({ encoding: 'utf8' })

markdown