next.config.mjs 569 B

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