This module allows the use of Unleash feature flagging system into your Nuxt 3 app using unleash-proxy-client.
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
This module allows the use of Unleash feature flagging system into your Nuxt 3 app.
- Uses the unleash-proxy-client SDK (v3.7.8) for communications with Unleash Proxy or Unleash Edge.
- Reactive feature flag reloading in your components
- Server-side (API) support
- Contextual features support
Install the module to your Nuxt application with one command:
``bash`
npm install approck-nuxt-unleash
Then add the options into your nuxt.config.ts:
`javascript`
export default defineNuxtConfig({
modules: ["approck-nuxt-unleash"],
unleash: {
url: "https://your-unleash-proxy.com/api/frontend",
clientKey: "YOUR_CLIENT_KEY",
appName: "my-app-name",
refreshInterval: 15, // optional, in seconds
environment: "production", // optional
},
});
Note: This module requires an Unleash Proxy or Unleash Edge instance. The url should point to your proxy's frontend API endpoint (typically /api/frontend), and clientKey is the client-side API token from your Unleash instance.
That's it! You can now use Unleash in your Nuxt app ✨
Local development
`bash``
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
[npm-version-src]: https://img.shields.io/npm/v/approck-nuxt-unleash/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/approck-nuxt-unleash
[npm-downloads-src]: https://img.shields.io/npm/dm/approck-nuxt-unleash.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npm.chart.dev/approck-nuxt-unleash
[license-src]: https://img.shields.io/npm/l/approck-nuxt-unleash.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/approck-nuxt-unleash
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com