-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Use .env variables on defineI18nConfig #2548
Comments
Hmm, it seems that it is not accessible in the @danielroe |
@kazupon @danielroe This does work if the imports happen directly inside the plugin, see BobbieGoede#18 (still need to clean it up a bit, hence PR on my fork). Maybe it is preferable to move that logic out of the generated file anyway so that the types get checked. I don't know why this does work and the other approach does not 😅.. Maybe there is an easy way to debug this that I'm unaware of 🤔. |
I'm closing this as it should be possible to use |
I'm still having issues with this - This is using '"@nuxtjs/i18n": "8.0.0-rc.5",' |
Environment
Reproduction
Describe the bug
I need to use environment variables inside
defineI18nConfig
but i recieve undefined in some cases:[Vue Router warn]: No match found for location with path "/undefined/cms/strings"
I receive the correct string at the start but after a while it stops working.
chrome_ILuUy04jXB.mp4
There seems to be a point where I do get access to
process.env.NUXT_PUBLIC_API_URL
but it stops working after a while.I cannot access
useRuntimeConfig
either because I am not in the nuxt context.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: