/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
  experimental: {
    serverComponentsExternalPackages: ['@mendable/firecrawl-js', 'pdf-parse', '@napi-rs/canvas'],
  },
  env: {
    NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA: process.env.VERCEL_GIT_COMMIT_SHA || "dev",
    NEXT_PUBLIC_TAG_VERSION: process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 8) || "dev",
  },
  async headers() {
    return [
      {
        source: "/t.js",
        headers: [
          { key: "Cache-Control", value: "public, max-age=300, s-maxage=300, stale-while-revalidate=3600" },
        ],
      },
    ];
  },
};

export default nextConfig;
