Files
AnchorOS/next.config.js
Marco Gallegos f6832c1e29 fix: Improve API initialization with lazy Supabase client and validation
- Move Supabase/Stripe initialization inside GET/POST handlers for lazy loading
- Add validation for missing environment variables in runtime
- Improve error handling in payment intent creation
- Clean up next.config.js environment variable configuration

This fixes potential build-time failures when environment variables are not available
during static generation.
2026-01-18 22:51:45 -06:00

29 lines
643 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: {
domains: ['localhost'],
remotePatterns: [
{
protocol: 'https',
hostname: '**.supabase.co',
}
],
},
env: {
NEXT_PUBLIC_SUPABASE_URL: process.env.NEXT_PUBLIC_SUPABASE_URL,
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
},
compiler: {
removeConsole: false, // Temporarily enable logs for debugging 500 errors
}
}
module.exports = nextConfig