import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ const nextConfig = { // Your Next.js config here async rewrites() { return [ { source: '/((?!admin|api))tenant-domains/:path*', destination: '/tenant-domains/:tenant/:path*', has: [ { type: 'host', value: '(?.*)', }, ], }, ] }, } export default withPayload(nextConfig)