You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure .env and .env.local. In this example, .env refers to the template, .env.local refer to the actual values
Keep the template env property empty
Do not define it in .env.local (let nuxt.config.ts use the default value of runtime config)
Run nuxt with nuxt dev --dotenv .env.local
Nuxt fallbacks on .env file's values if it doesn't find it in the configured env file .env.local
Additional context
I digged a bit and I can't tell whether the issue comes from @nuxt/cli or @nuxt/kit. I noticed sometimes the dotenv property is not passed as a string but casted as a boolean, which makes dotenv load the default env file (.env) instead of the one configured
Environment
Darwin
v21.6.2
3.10.3
3.10.1
2.9.3
[email protected]
-
devtools
,typescript
,colorMode
,modules
,runtimeConfig
,nitro
,tailwindcss
,supabase
,experimental
@nuxtjs/[email protected]
,@nuxt/[email protected]
,@nuxt/[email protected]
,@vueuse/[email protected]
-
Reproduction
https://stackblitz.com/edit/github-xxfchy
Describe the bug
.env
and.env.local
. In this example,.env
refers to the template,.env.local
refer to the actual values.env.local
(letnuxt.config.ts
use the default value of runtime config)nuxt dev --dotenv .env.local
.env
file's values if it doesn't find it in the configured env file.env.local
Additional context
I digged a bit and I can't tell whether the issue comes from
@nuxt/cli
or@nuxt/kit
. I noticed sometimes thedotenv
property is not passed as a string but casted as a boolean, which makesdotenv
load the default env file (.env
) instead of the one configuredLogs
No response
The text was updated successfully, but these errors were encountered: