Fix build time: env var placeholders + sacar .next del repo
- lib/supabase.ts: ?? placeholders para que el módulo cargue en build time sin las env vars; force-dynamic garantiza que nunca se llame en build time. - next.config.ts: env fallbacks vacíos para que Next.js no aborte al no encontrar NEXT_PUBLIC_SUPABASE_* en build time. - .gitignore: agrega .next/ (artefactos de build no van a git). - git rm --cached .next/**: saca los artefactos ya trackeados. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import type { NextConfig } from 'next'
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone"
|
||||
output: 'standalone',
|
||||
env: {
|
||||
NEXT_PUBLIC_SUPABASE_URL: process.env.NEXT_PUBLIC_SUPABASE_URL ?? '',
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? '',
|
||||
},
|
||||
}
|
||||
|
||||
export default nextConfig
|
||||
Reference in New Issue
Block a user