mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 00:43:23 +00:00
22 lines
598 B
JavaScript
22 lines
598 B
JavaScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
|
|
const dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
webpack: (webpackConfig) => {
|
|
webpackConfig.resolve.extensionAlias = {
|
|
'.cjs': ['.cts', '.cjs'],
|
|
'.js': ['.ts', '.tsx', '.js', '.jsx'],
|
|
'.mjs': ['.mts', '.mjs'],
|
|
}
|
|
|
|
return webpackConfig
|
|
},
|
|
serverExternalPackages: ['mongodb-memory-server'],
|
|
}
|
|
|
|
export default withPayload(nextConfig, { devBundleServerPackages: false })
|