import withMintelConfig from "@mintel/next-config"; import path from 'path'; import { fileURLToPath } from 'url'; const filename = fileURLToPath(import.meta.url); const dirname = path.dirname(filename); /** @type {import('next').NextConfig} */ const nextConfig = { serverExternalPackages: [ 'canvas', 'sharp', 'puppeteer', 'require-in-the-middle', 'import-in-the-middle' ], images: { remotePatterns: [ { protocol: 'https', hostname: '*.your-objectstorage.com', }, { protocol: 'https', hostname: 'fsn1.your-objectstorage.com', }, ], }, // The site is a single page. Old URLs from the previous site lead to it. async redirects() { return [ "/about", "/process", "/notes/:path*", "/book", "/contact", "/websites", "/blog/:path*", "/case-studies/:path*", "/technologies/:path*", "/tags/:path*", ] .map((source) => ({ source, destination: "/", permanent: true })) .concat([ { source: "/impressum", destination: "/imprint", permanent: true }, { source: "/datenschutz", destination: "/privacy", permanent: true }, ]); }, // In Standalone mode, Next.js expects the tracing root to be the monorepo root outputFileTracingRoot: path.join(dirname, '../../'), }; // Clean, standard wrapper application const config = withMintelConfig(nextConfig); // Cleanup config to prevent Next.js 16 warnings about deprecated keys if (config.serverActions) { delete config.serverActions; } export default config;