import type { NextConfig } from "next"; import createNextIntlPlugin from "next-intl/plugin"; const withNextIntl = createNextIntlPlugin(); const nextConfig: NextConfig = { /* config options here */ sassOptions: { silenceDeprecations: ["legacy-js-api"], }, async rewrites() { return [ { source: "/api/:path*", destination: `${process.env.API_SERVER}/:path*`, // Zielserver aus Umgebungsvariable }, ]; }, // This is required to support PostHog trailing slash API requests skipTrailingSlashRedirect: true, }; export default withNextIntl(nextConfig);