-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin-nuxt does not resolve runtimeConfig values #494
Comments
If you need a workaround I found the following solution:
I hope that helps :) |
I tried this workaround, but it didn't help. Any other idea to resolve this issue? |
@positiveprogrammer are you using the most recent version? |
Yes, I'm on the most recent version of Nuxt, Histoire, histoire/plugin-nuxt :-) |
I found a workaround for this issue. I successfully override manually runtime config in the setupVue3, something like below. useRuntimeConfig().public.someKey = someValue I hope this workaround can help some use cases. |
Describe the bug
I'm using Nuxt 3.3.1
Say I have a following runtimeConfig declaration in
nuxt.config.ts
apiKey
andenvironment
value is injected from.env
And I have a following component which renders runtimeConfig content
This component renders runtimeConfig properly when rendered in Nuxt dev server.
but it doesn't when rendered by Histoire.
Reproduction
https://github.com/yshrsmz/histoire-nuxt-repro1
I followed the nuxt official instruction, so should be a minimal repro.
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: