vkashti / next.config.js
next.config.js
Raw
/** @type {import('next').NextConfig} */
const nextConfig = {
  // Use standalone output instead of export for dynamic routes
  output: 'standalone',
  
  // Basic image configuration
  images: {
    formats: ['image/webp'],
    deviceSizes: [640, 750, 828, 1080, 1200, 1920],
    imageSizes: [16, 32, 48, 64, 96, 128, 256],
    dangerouslyAllowSVG: true,
    remotePatterns: [],
  },
  
  // Disable problematic experimental features
  experimental: {
    // Disable features that might cause stack issues
    optimizeCss: false,
    memoryBasedWorkersCount: false,
    // Add more conservative settings
    serverActions: false,
    serverComponentsExternalPackages: [],
  },
  
  // Simplified webpack config
  webpack: (config) => {
    // Disable source maps in production
    if (process.env.NODE_ENV === 'production') {
      config.devtool = false;
    }
    return config;
  }
};

module.exports = nextConfig;