Next.js Discord

Discord Forum

codegen with vercel.json

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

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