import { configHeader } from '@/utils/constants/server';
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  devIndicators: false,
  reactStrictMode: true,
  typescript: {
    ignoreBuildErrors: false,
  },
  images: {
    unoptimized: true,
    remotePatterns: [],
  },
  async headers() {
    return configHeader;
  },
  async rewrites() {
    return [
      {
        source: '/:slug.html',
        destination: '/product/:slug',
      },
    ];
  },
  compress: true, 
  experimental: {
    optimizePackageImports: ["lodash", "date-fns"],
    serverActions: {
      bodySizeLimit: "2mb",
    },
  },
};

export default nextConfig;
