Skip to content

Conversation

@geferon
Copy link
Contributor

@geferon geferon commented Nov 9, 2025

Problem

Currently, the Nuxt Client Plugin lacks a name, which means that other plugins can't depend on it, so execution order isn't guaranteed, etc.

Changes

Added name to Nuxt Client Plugin posthog-client, which will allow other plugins to depend on it. Fixes #2558

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react
  • @posthog/ai
  • @posthog/nextjs-config
  • @posthog/nuxt

Checklist

  • Tests for new code
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

If releasing new changes

  • Ran pnpm changeset to generate a changeset file
  • Added the "release" label to the PR to indicate we're publishing new versions for the affected packages

@vercel
Copy link

vercel bot commented Nov 9, 2025

@geferon is attempting to deploy a commit to the PostHog Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@geferon
Copy link
Contributor Author

geferon commented Nov 11, 2025

The PR has been approved, but it's yet to be merged and pass three checks, one of which is Vercel which needs to be approved?
Do I need to do anything or is this up to the team @hpouillot

@geferon geferon changed the title feat: Added name to nuxt client plugin feat(nuxt): Added name to nuxt client plugin Nov 11, 2025
@pauldambra pauldambra requested a review from Copilot November 13, 2025 09:41
Copilot finished reviewing on behalf of pauldambra November 13, 2025 09:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a name property to the Nuxt client plugin to enable proper plugin dependency management and execution ordering in Nuxt applications.

Key Changes

  • Refactored the Nuxt client plugin from function form to object form with a name property
  • The plugin is now named posthog-client, allowing other plugins to declare dependencies on it
  • Added a changeset documenting this as a minor version bump

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/nuxt/src/runtime/vue-plugin.ts Converted defineNuxtPlugin from function form to object form with name property and setup method
.changeset/red-dots-travel.md Added changeset documenting the addition of the plugin name as a minor version change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pauldambra pauldambra merged commit 905f748 into PostHog:main Nov 13, 2025
30 of 33 checks passed
@pauldambra
Copy link
Member

@geferon thanks for the PR!

i should be cutting a release later today, will comment back here when that happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give the Nuxt Runtime Plugin a Name

3 participants