Getting Started

Configuration

All configuration options for nuxt-unleash.

Module Options

Configure the module in your nuxt.config.ts under the unleash key:

nuxt.config.ts
export default defineNuxtConfig({
  unleash: {
    url: 'https://your-proxy.example.com/api/frontend',
    token: 'your-frontend-api-token',
    appName: 'my-app',
    environment: 'default',
    refreshInterval: 15_000,
    clientRefreshInterval: 30_000,
    storage: 'memory',
    storageKey: 'unleash:flags',
  },
})
url
string required
Unleash Proxy Frontend API URL.
token
string required
Frontend API token. Stays server-side only — never exposed to the client.
appName
string required
Application name sent to the Unleash proxy.
environment
string
Environment name.
refreshInterval
number
Server-side stale-while-revalidate TTL in milliseconds. When cached flags are older than this, the next request triggers a background refresh.
clientRefreshInterval
number
Client-side polling interval in milliseconds. Set to 0 to disable client polling entirely.
storage
'nuxthub' | 'nitro' | 'memory'
Storage backend for caching flags. See Storage for details.
storageKey
string
Key prefix used in storage.

Runtime Config

The module splits config into private (server-only) and public (client + server):

KeyScopeContains
runtimeConfig.unleashServer onlyurl, token, appName, environment, refreshInterval
runtimeConfig.public.unleashClient + ServerappName, environment, clientRefreshInterval
The token is never sent to the client. All client communication goes through the internal /api/_unleash/flags route.
Copyright © 2026