Skip to content

Commit

Permalink
fix: adjust env loading order due to dotenv expand
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 19, 2020
1 parent 7a4606d commit 74ef32c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,10 @@ function resolvePlugin(config: UserConfig, plugin: Plugin): UserConfig {
function loadEnv(mode: string, root: string): Record<string, string> {
debug(`env mode: ${mode}`)
const envFiles = [
/** default file */ `.env`,
/** local file */ `.env.local`,
/** mode local file */ `.env.${mode}.local`,
/** mode file */ `.env.${mode}`,
/** mode local file */ `.env.${mode}.local`
/** local file */ `.env.local`,
/** default file */ `.env`
]

const env: Record<string, string> = {}
Expand Down

0 comments on commit 74ef32c

Please sign in to comment.