Open
Description
Which packages are impacted by your issue?
@graphql-codegen/client-preset
Describe the bug
New @graphql-codegen/client-preset
and @graphql-codegen/client-preset-swc-plugin
doesn't work with the latest Next.js version. It panics when trying to build or run a development server and it crashes. When using the old babel plugin there wasn't such a problem. I know it's still early in development, but sadly it doesn't work.
Your Example Website or App
https://github.com/huv1k/nextjs-auth-prisma
Steps to Reproduce the Bug or Issue
- Clone https://github.com/huv1k/nextjs-auth-prisma
- Install dependencies using
yarn install
- Run
yarn dev
oryarn build
- Process
panicked
Expected behavior
I would expect the build to finish or the dev server to start, but it crashes.
Screenshots or Videos

Platform
- OS: macOS 13.0.1
- NodeJS: 18.16.0
graphql
version: 16.6.0@graphql-codegen/cli
: 3.3.0@graphql-codegen/client-preset
: 3.0.1@graphql-codegen/client-preset-swc-plugin
: 0.2.0
Codegen Config File
No response
Additional context
No response