import path from "path";
import { NextConfig } from "next";

const config: NextConfig = {
  reactStrictMode: true,
  typescript: {
    // Allow build to succeed even with type errors
    ignoreBuildErrors: true,
  },
  eslint: {
    // Allow build to succeed even with lint errors
    ignoreDuringBuilds: true,
  },
  webpack: (config) => {
    config.resolve = {
      ...config.resolve,
      alias: {
        ...config.resolve?.alias,
        react: path.resolve("./node_modules/react"),
        "react-dom": path.resolve("./node_modules/react-dom"),
      },
    };
    return config;
  },
};

export default config;
