/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  transpilePackages: ['@bmm/types'],
  experimental: {
    typedRoutes: false,
    // Inline the CSS into the HTML <head> so it is not a render-blocking
    // request — improves FCP/LCP, especially on slow mobile connections.
    inlineCss: true,
  },
  async rewrites() {
    return [
      {
        source: '/api/:path*',
        destination: `${process.env.NEXT_PUBLIC_API_URL ?? 'http://localhost:4000'}/:path*`,
      },
    ];
  },
};

export default nextConfig;
