Skip to content

Commit

Permalink
fix: breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Nov 8, 2022
1 parent 85b90fc commit ddc11bd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/vite/src/node/env.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import fs from 'node:fs'
import dotenv from 'dotenv'
import dotenv, { config } from 'dotenv'
import { expand } from 'dotenv-expand'
import { arraify, lookupFile } from './utils'
import type { UserConfig } from './config'

config({
debug: process.env.DEBUG?.includes('vite:dotenv')
})

export function loadEnv(
mode: string,
envDir: string,
Expand Down Expand Up @@ -31,11 +35,7 @@ export function loadEnv(
rootDir: envDir
})
if (!path) return []
return Object.entries(
dotenv.parse(fs.readFileSync(path), {
debug: process.env.DEBUG?.includes('vite:dotenv')
})
)
return Object.entries(dotenv.parse(fs.readFileSync(path)))
})
)

Expand Down

0 comments on commit ddc11bd

Please sign in to comment.