Skip to content

Drop need to specify the runtime config when using .env #239

Description

@harlan-zw

🆒 Your use case

I beleive this is a Nuxt edge case for .env, but end user needs to specify an empty key for the .env override to do anything, i.e:

exportdefaultdefineNuxtConfig({scripts: {registry: {googleAnalytics: true,}},// you need to provide a runtime config to access the environment variablesruntimeConfig: {public: {scripts: {googleAnalytics: {// .env// NUXT_PUBLIC_SCRIPTS_GOOGLE_ANALYTICS_ID=<your-id>id: '',},},},},})

🆕 The solution you'd like

We should try and see if we can drop the need for this runtimeConfig as it's quite verbose.

🔍 Alternatives you've considered

No response

ℹ️ Additional info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions