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
@pi0 We have a need for this as well, so happy to provide a PR if desired 🙂
Before diving into anything though, do you have any more in-depth thoughts/specs on how that should work?
Directus' configuration currently does a similar level of "automagic" type casting and nesting by looking at the env var name (so for example THIS_IS__NESTED="true" becomes { "thisIs": { "nested": true }}, so happy to lift some of that logic into c12 and tweak it for the updated syntax. What's your plan for "multipart" names? Like should NUXT_CONFIG_CAMEL_CASE become { "camelCase": x }? Curious to hear your thoughts! Also happy to chat on Discord / Google Meet or whatever else is most convenient for you 🙂
We can use destr to allow overriding any configuration using
process.env.{NAME}_CONFIG_{PATH}
.Let's same NAME is
NUXT
:NUXT_CONFIG_SSR=false
overridesssr
tofalse
NUXT_CONFIG_GENERATE:CRAWLER=true
overridesgenerate.crawler
totrue
NUXT_CONFIG={"ssr": false, "generate": { "crawler": true }}
does the same as two aboveNotes:
defaults
option needs to exist in order to enable an env variable to overrideThe text was updated successfully, but these errors were encountered: