Skip to content

Next.js 13+ app directory support #3

@chrisjh

Description

@chrisjh

Are there any plans to add Next.js 13 app directory support to this package?

There's a few things that don't quite work the same between pages and app directory related to structured logging and API routes:

The new app route handler in Next.js 13 has specific named exports (GET, POST, PUT, DELETE). The current version of logtail-nextjs wraps the pages api handler with withLogtail(handler) which no longer works with the new named exports. Additionally, Next changed the types to NextResponse and NextRequest from NextApiResponse and NextApiRequest.

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