Next.js Discord

Discord Forum

codegen with vercel.json

Answered
Sweat bee posted this in #help-forum
Open in Discord
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:

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "buildCommand": null,
  "devCommand": null,
  "installCommand": null,
  "framework": "nextjs",
  "outputDirectory": null
}
Answered by linesofcode
Override the build command
View full answer

6 Replies

Hey
In your nextjs app
In the package.json
Override the build command
Answer
To run codegen and then run next build
Sweat beeOP
thanks that worked!