NuxtN
Nuxt9mo ago
11 replies
mooz

runtimeConfig is empty

runtimeConfig: {
    // The private keys which are only available within server-side
    apiSecret: '123',
    // Keys within public, will be also exposed to the client-side
    public: {
      apiBase: '/api'
    }
  },
thats in my nuxt.config.ts,
and thats what on my page:
    <p>{{ $config.public.apiBase || "No value" }}</p>

Webpage says no value 😭
image.png
Was this page helpful?