From ffd9a65fa5ddf20a5a9f4ce49c607d68d4dece68 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Mon, 22 Jun 2026 16:28:35 +0200 Subject: [PATCH] fix(build): trace YAML spec dirs so Vercel ships latest dev specs --- next.config.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/next.config.ts b/next.config.ts index e51c52f0..2392aa16 100644 --- a/next.config.ts +++ b/next.config.ts @@ -81,6 +81,24 @@ const nextConfig: NextConfig = { experimental: { optimizePackageImports: ["lucide-react"], }, + // YAML spec files live outside src and are loaded at runtime via + // fs.readFile(process.cwd() + "/benchmarks/..."). Next's default file + // tracer only follows static imports, so those YAML files were not + // making it into the Vercel build artifact and the prebuilt deployment + // kept serving a snapshot from whichever earlier build first cached + // them. outputFileTracingIncludes forces every YAML directory the + // spec loaders read at runtime to be packaged with the deployment so + // the page always reflects the dev HEAD of these specs. + outputFileTracingIncludes: { + "/**": [ + "./benchmarks/**/*.yml", + "./benchmarks/**/*.yaml", + "./answers/**/*.yml", + "./answers/**/*.yaml", + "./alternatives/**/*.yml", + "./alternatives/**/*.yaml", + ], + }, async headers() { return [ {