Files
CPLv4.0/next.config.mjs
ISA 44ae17f6e8 build: Konfiguration für statische Exporte mit Umgebungsvariable optimiert
- output: "export" wird jetzt automatisch bei EXPORT_STATIC=true aktiviert
- Entwicklungsmodus (npm run dev) nutzt weiterhin API-Routen für Mock-Tests
- Neues npm-Skript nutzt cross-env für Umgebungsunabhängigkeit bei Windows/Linux
- cross-env als devDependency hinzugefügt
2025-04-22 12:21:20 +02:00

15 lines
311 B
JavaScript

/** @type {import('next').NextConfig} */
const isExport = process.env.EXPORT_STATIC === "true";
const nextConfig = {
reactStrictMode: true,
trailingSlash: false,
images: {
unoptimized: true,
},
...(isExport && { output: "export" }), // ⬅️ dynamisch aktivieren
};
export default nextConfig;