-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@graphql-codegen/client-preset-swc-plugin ... #9450
Comments
I can confirm that I get the same issue/error when using the latest version of the Vite react-swc plugin. |
When will this be fixed ? |
I have the same issue but with Vite.
|
Please specify the Next.js version where this breaks. |
Same problem here when trying to buil NX lib when configuring
|
Same with vite |
The problem is related to the outdated |
This allows the swc-plugin to work with Next.js v13.4.10, or later, as documented on https://swc.rs/docs/plugin/selecting-swc-core. As part of upgrading, we also set `lto = false` because of build failures that have been popped up (swc-project/swc#7479). Closes: dotansimha#9450
@JesseVelden @YassinEldeeb @kamilkisiela any idea if this can be fixed at any point in the near future? I'm on |
Ah, I saw in this related issue that in fact there is a way to fix this today—but you need to compile your own version of the swc plugin: So for anyone else who sees this issue, please read that comment! |
This allows the swc-plugin to work with Next.js v13.4.10, or later, as documented on https://swc.rs/docs/plugin/selecting-swc-core. As part of upgrading, we also set `lto = false` because of build failures that have been popped up (swc-project/swc#7479). Closes: dotansimha#9450
I'm using next@13.5.2 but still unusable |
Not working with |
Not working with |
Not working with 14.0.1 |
This allows the swc-plugin to work with Next.js v13.4.10, or later, as documented on https://swc.rs/docs/plugin/selecting-swc-core. As part of upgrading, we also set `lto = false` because of build failures that have been popped up (swc-project/swc#7479). Closes: dotansimha#9450
Can someone create an example on GitHub or CodeSandbox we could run and test with the latest versions? Sorry but I'm not adding a lot here but just labeling it according to our new Contribution Guide and issue flow. It seems already got into Later to progress to Thank you and sorry that this comment is not a complete solution (yet). |
Hey, thanks for reporting! And sorry for the long delay. Please add a 👍 to the issue and feel free to join the conversation. I'll keep you updated! |
Does anyone have an easy to follow write-up for how to get this to work while we wait for a permanent solution? |
## What's the purpose of this pull request? This PR intends to introduce `next/font` built-in feature to the project (`app` directory). The `babelrc.js` config file needed to be removed in favor of `next/font` usage, [it's mandatory](https://nextjs.org/docs/messages/babel-font-loader-conflict). Next.js requires the use of its own compiler (SWC) config, so for now we still don't have the necessary GraphQL Codegen plugin to replace the `@graphql-codegen/client-preset` being loaded in the Babel config file, as the existing one ([`@graphql-codegen/client-preset-swc-plugin`](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#swc-plugin)) has a bug that hasn't been solved yet (see [here](dotansimha/graphql-code-generator#9753) and [here](dotansimha/graphql-code-generator#9450). Also, right now we are just introducing the feature, but we will have to support local fonts and font override later in other tasks. ## How to test it? - Run the local server (`yarn turbo run dev --filter=@faststore/core`); - Make sure that all the current pages are working as expected (`/`, `/office` and some `/<slug>/p`); - Make sure `/fs-next-update` is rendering with some text on the top of the page and without errors. ## References - https://nextjs.org/blog/next-13#nextfont - https://nextjs.org/docs/app/api-reference/components/font#css-variables - https://nextjs.org/docs/app/building-your-application/optimizing/fonts
Swinging back around - any progress? |
How about if we just don't generate a giant file to start with - I can manually edit the generated file so that it adds almost no overhead in the bundle: #9988 |
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
yarn install
yarn dev
oryarn build
panicked
Expected behavior
I would expect the build to finish or the dev server to start, but it crashes.
Screenshots or Videos
Platform
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.0Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: