dso/apps/cms/next.config.mjs
Aron August Hohmann c452a505e2 first commit
2026-09-03 19:51:56 +02:00

30 lines
No EOL
762 B
JavaScript

import { withPayload } from '@payloadcms/next/withPayload'
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 = {
images: {
localPatterns: [
{
pathname: '/api/media/file/**',
},
],
},
webpack: (webpackConfig) => {
webpackConfig.resolve.extensionAlias = {
'.cjs': ['.cts', '.cjs'],
'.js': ['.ts', '.tsx', '.js', '.jsx'],
'.mjs': ['.mts', '.mjs'],
}
return webpackConfig
},
turbopack: {
root: path.resolve(__dirname, '../..'), // ← monorepo root
},
}
export default withPayload(nextConfig, { devBundleServerPackages: false })