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

Module reads runtimeConfig directly rather than overridden config #348

Open
cco3 opened this issue Apr 6, 2024 · 0 comments
Open

Module reads runtimeConfig directly rather than overridden config #348

cco3 opened this issue Apr 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cco3
Copy link

cco3 commented Apr 6, 2024

Version

@nuxtjs/supabase: 1.1.7
nuxt: 3.11.1

Steps to reproduce

Use NUXT_PUBLIC_SUPABASE_URL and NUXT_PUBLIC_SUPABASE_KEY in your .env file as suggested here:
https://supabase.nuxtjs.org/get-started#installation

Include these in your runtime config:

  runtimeConfig: {
    public: {
      supabase: {
        key: "",
        url: "http://127.0.0.1:54321",
      },
    },
  },

What is Expected?

No warnings are given.

What is actually happening?

A warning is given because the key is set to an empty string (even though it is overridden with NUXT_PUBLIC_SUPABASE_KEY.

if (!nuxt.options.runtimeConfig.public.supabase.key) {

I would expect the module to allow me to override the value before deciding to give me a warning, but it reads the config directly.

@cco3 cco3 added the bug Something isn't working label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant