// /** @type {import('next').NextConfig} */
// const nextConfig = {};

// export default nextConfig;

/** @type {import('next').NextConfig} */
const nextConfig = {
  ...(process.env.NEXT_PUBLIC_BASE_PATH && { basePath: process.env.NEXT_PUBLIC_BASE_PATH }),

  async redirects() {
    if (process.env.NEXT_PUBLIC_BASE_PATH) {
      return [
        {
          source: '/',
          destination: process.env.NEXT_PUBLIC_BASE_PATH,
          basePath: false,
          permanent: false,
        },
      ];
    }
    return [];
  },
  images: {
    domains: ["api.presivio.com", "stagingapi.hugahealth.com", "192.168.137.46", "159.89.164.11", "192.168.137.158", "172.18.0.7", "183.83.52.184", "172.21.160.1", "api.hugahealth.com", "api.medivora.com", "192.168.0.38", "134.209.151.32", "stagingclinicapi.hugahealth.com", "157.245.101.215"],

  },
};

export default nextConfig;

