- Next.js 16 App Router + Payload CMS 3.82 - PostgreSQL via @payloadcms/db-postgres - All pages: Home, Services (4), About, Portfolio, Blog, Contact, FAQ - PDPA: CookieBanner, ConsentLogs API, Privacy Policy, Terms, Cookie Policy - SEO: sitemap, robots.txt, metadata exports, JSON-LD
32 lines
763 B
TypeScript
32 lines
763 B
TypeScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
import type { NextConfig } from 'next'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const dirname = path.dirname(__filename)
|
|
|
|
const nextConfig: NextConfig = {
|
|
images: {
|
|
localPatterns: [
|
|
{
|
|
pathname: '/api/media/file/**',
|
|
},
|
|
],
|
|
},
|
|
output: 'standalone',
|
|
webpack: (webpackConfig) => {
|
|
webpackConfig.resolve.extensionAlias = {
|
|
'.cjs': ['.cts', '.cjs'],
|
|
'.js': ['.ts', '.tsx', '.js', '.jsx'],
|
|
'.mjs': ['.mts', '.mjs'],
|
|
}
|
|
return webpackConfig
|
|
},
|
|
turbopack: {
|
|
root: path.resolve(dirname),
|
|
},
|
|
}
|
|
|
|
export default withPayload(nextConfig, { devBundleServerPackages: false })
|