Skip to content

Commit

Permalink
fix: support environment variable expansion (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
Esirei authored Oct 7, 2021
1 parent da10592 commit e89882c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"debug": "^4.3.2",
"deepmerge": "^4.2.2",
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"execa": "^5.1.1"
}
}
3 changes: 2 additions & 1 deletion npm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import deepmerge from 'deepmerge'
import execa from 'execa'
import chalk from 'chalk'
import dotenv from 'dotenv'
import dotenvExpand from 'dotenv-expand'
import makeDebugger from 'debug'

type VitePlugin = Plugin | ((...params: any[]) => Plugin)
Expand Down Expand Up @@ -67,7 +68,7 @@ export class ViteConfiguration {
config: (UserConfig | ((env: typeof process.env) => UserConfig)) = {},
artisan: PhpConfiguration = {},
) {
dotenv.config()
dotenvExpand(dotenv.config())
debug('Loaded configuration with dotenv')

// Sets the base directory.
Expand Down

0 comments on commit e89882c

Please # to comment.