Skip to content

chore(server): follow-ups for Nuxt adapter's h3 and nuxt/server support #2883

Open

Description

@genu

Follow-ups from #2882, which lets the Nuxt adapter handle both the portable nuxt/server event (Nuxt 4.6+) and the h3 v1 event.

Deprecate the h3 path

  • createEventHandler in packages/server/src/adapter/nuxt/handler.ts still has an h3 v1 branch (lazy import('h3')) for unwrapped handlers.
  • Remove it when Nuxt 4 support is dropped (around Nuxt 5, Nitro v3 / h3 v2).
  • At that point also remove the optional h3 peer dependency and the H3Event member of NuxtHandlerEvent.

Track the nuxt/server type

  • NuxtHandlerEvent imports RequestEvent from nuxt/server, which only exists from Nuxt 4.6.
  • On Nuxt 4.0 to 4.5 that import is unresolved and becomes any under skipLibCheck (a type error without it).
  • Options: define a small local structural type, or raise the nuxt peer range to ^4.6.0.
  • Revisit if Nuxt changes RequestEvent before Nuxt 5.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions