Skip to content
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 the useRuntimeConfig() composable instead of static options #253

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chrismarsh-hhl
Copy link
Contributor

Using nuxt.options.runtimeConfig returns static options from nuxt.config.ts. If you use the results of useRuntimeConfig() then those values are updated by environment variables.

chrismarsh-hhl and others added 3 commits September 27, 2024 10:13
Nuxt allows you to use environment variables through useRuntimeConfig. This is preferable when you
want different settings in different environments, and want to use secrets (e.g. SMTP username and
password) without exposing them in nuxt.config.ts. This change adds `runtimeConfig.mail` options to
the options object.

fix dword-design#120
@dword-design
Copy link
Owner

@chrismarsh-hhl I'm fine with the change, but I think Nuxt won't be able to convert the environment variable to JSON, right? Can we adjust the test somehow that it covers the use case? How would the use case look like?

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.

2 participants