-
-
Notifications
You must be signed in to change notification settings - Fork 805
Runtime config objects not replaced by env variables #1830
Copy link
Copy link
Closed
Labels
Description
Environment
- Operating System: Linux
- Node Version: v18.18.0
- Nuxt Version: 3.7.4
- CLI Version: 3.9.0
- Nitro Version: 2.6.3
- Package Manager: npm@9.4.2
- Builder: -
- User Config: devtools, runtimeConfig
- Runtime Modules: -
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-e6syfm-bu4rgq?file=nuxt.config.ts
Describe the bug
As described in docs, matching env variables should replace runtime config properties.
However, a property with primitive and non-primitive type (e.g boolean | object) cannot be replaced.
runtimeConfig: {
public: {
feature: { // Setting `NUXT_PUBLIC_FEATURE=false` has no effect
option: true,
},
},
},Additional context
Related issues
- Runtime config objects not replaced by env variables nuxt/nuxt#23695
- Support runtime configuration Baroshem/nuxt-security#233 (comment)
Logs
No response
Reactions are currently unavailable