approck-nuxt-unleash
v0.1.0
Published
This module allows the use of Unleash feature flagging system into your Nuxt 3 app using unleash-proxy-client.
Downloads
323
Readme
Nuxt 3 Unleash Module
This module allows the use of Unleash feature flagging system into your Nuxt 3 app.
Features
- 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
Quick Setup
Install the module to your Nuxt application with one command:
npm install approck-nuxt-unleashThen add the options into your nuxt.config.ts:
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 ✨
Contribution
# 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