Explorar el Código

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 hace 3 meses
padre
commit
a123f56fe3
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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;