Skip to content

chore: don't shadow env variables in runtime config#2782

Merged
tobiasdiez merged 7 commits intomainfrom
fix-nuxt-env
Sep 7, 2025
Merged

chore: don't shadow env variables in runtime config#2782
tobiasdiez merged 7 commits intomainfrom
fix-nuxt-env

Conversation

@tobiasdiez
Copy link
Copy Markdown
Member

From https://nuxt.com/docs/4.x/guide/going-further/runtime-config,

Setting the default of runtimeConfig values to differently named environment variables (for example setting myVar to process.env.OTHER_VARIABLE) will only work during build-time and will break on runtime. It is advised to use environment variables that match the structure of your runtimeConfig object.

🔗 Linked issue

📚 Description

From https://nuxt.com/docs/4.x/guide/going-further/runtime-config,
> Setting the default of runtimeConfig values to differently named environment variables (for example setting myVar to process.env.OTHER_VARIABLE) will only work during build-time and will break on runtime. It is advised to use environment variables that match the structure of your runtimeConfig object.
@tobiasdiez tobiasdiez merged commit 56fe9bc into main Sep 7, 2025
4 of 6 checks passed
@tobiasdiez tobiasdiez deleted the fix-nuxt-env branch September 7, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant