cheatingchelsea/next.config.ts
Derek Slenk 06a0051c51 Fix Amplify environment variable access
- Simplified amplify.yml to export env var during build
- Updated both gallery and dadvocate pages to check multiple env var names
- Added debugging to show available env vars
- Added publicRuntimeConfig and serverRuntimeConfig to next.config.ts
- Created config helper in lib/config.ts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 15:33:58 -04:00

37 lines
775 B
TypeScript

import type {NextConfig} from 'next';
const nextConfig: NextConfig = {
/* config options here */
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'placehold.co',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'img.youtube.com',
port: '',
pathname: '/**',
},
],
},
// Make environment variables available to the browser
publicRuntimeConfig: {
YOUTUBE_API_KEY: process.env.YOUTUBE_API_KEY,
},
// Server-side environment variables
serverRuntimeConfig: {
YOUTUBE_API_KEY: process.env.YOUTUBE_API_KEY,
},
};
export default nextConfig;