codegen with vercel.json
Answered
Sweat bee posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Sweat beeOP
anyone know how I can use graphql-codegen in my vercel configuration? It hast to run after npm i but before next build...
This is my config so far:
This is my config so far:
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": null,
"devCommand": null,
"installCommand": null,
"framework": "nextjs",
"outputDirectory": null
}
6 Replies
![Avatar](https://cdn.discordapp.com/avatars/414145877335080960/c7ab639b9f825e9f8db0ed902b831f2b.webp?size=256)
linesofcode
Hey
In your nextjs app
In the package.json
![Avatar](https://cdn.discordapp.com/avatars/414145877335080960/c7ab639b9f825e9f8db0ed902b831f2b.webp?size=256)
linesofcode
Override the build command
Answer
![Avatar](https://cdn.discordapp.com/avatars/414145877335080960/c7ab639b9f825e9f8db0ed902b831f2b.webp?size=256)
linesofcode
To run codegen and then run next build
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Sweat beeOP
thanks that worked!