Bladeren bron

fix: resolve image demo /api/image 500 on Vercel (#253)

Add outputFileTracingIncludes so the Geist font TTF is bundled at the
symlink path the code reads from. In a pnpm monorepo the file was only
traced at the .pnpm store path, which Vercel does not map back to the
node_modules/geist/ symlink.
vzt7 3 maanden geleden
bovenliggende
commit
a123f56fe3
1 gewijzigde bestanden met toevoegingen van 5 en 0 verwijderingen
  1. 5 0
      examples/image/next.config.ts

+ 5 - 0
examples/image/next.config.ts

@@ -2,6 +2,11 @@ import type { NextConfig } from "next";
 
 const nextConfig: NextConfig = {
   serverExternalPackages: ["@resvg/resvg-js", "satori"],
+  outputFileTracingIncludes: {
+    "/api/image": [
+      "./node_modules/geist/dist/fonts/geist-sans/Geist-Regular.ttf",
+    ],
+  },
 };
 
 export default nextConfig;