nuxt-posthog dependency to your projectnpx nuxi@latest module add nuxt-posthog
nuxt-posthog to the modules section of nuxt.config.tsexport default defineNuxtConfig({
modules: ['nuxt-posthog'],
});
That's it! You can now use PostHog in your Nuxt app ✨
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
pnpm run test
pnpm run test:watch
# Release new version
pnpm run release