next.config.mjs 540 B

1234567891011121314151617181920
  1. import { withPayload } from '@payloadcms/next/withPayload'
  2. /** @type {import('next').NextConfig} */
  3. const nextConfig = {
  4. // Your Next.js config here
  5. serverActions: {
  6. bodySizeLimit: '50mb', // Increase limit for image uploads
  7. },
  8. webpack: (webpackConfig) => {
  9. webpackConfig.resolve.extensionAlias = {
  10. '.cjs': ['.cts', '.cjs'],
  11. '.js': ['.ts', '.tsx', '.js', '.jsx'],
  12. '.mjs': ['.mts', '.mjs'],
  13. }
  14. return webpackConfig
  15. },
  16. }
  17. export default withPayload(nextConfig, { devBundleServerPackages: false })