import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  /* O deploy monta a versão nova numa pasta à parte (KTALOGU_PASTA_DO_BUILD)
     e só troca pela .next quando ela fica pronta: enquanto o build roda, a
     versão no ar continua com todos os arquivos dela. Sem a variável, .next. */
  distDir: process.env.KTALOGU_PASTA_DO_BUILD || ".next",
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "**",
      },
    ],
  },
};

export default nextConfig;
