fix(kit): load dotenv if option is missing (#3029)

This commit is contained in:
Ahad Birang 2022-02-02 13:29:00 +03:30 committed by GitHub
parent a3579b7a1c
commit ed4f4f51ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ export async function loadNuxtConfig (opts: LoadNuxtConfigOptions): Promise<Nuxt
name: 'nuxt',
configFile: 'nuxt.config',
rcFile: '.nuxtrc',
dotenv: opts.dotenv,
dotenv: typeof opts.dotenv === 'undefined' ? {} as DotenvOptions : opts.dotenv,
globalRc: true,
overrides: opts.config
})