next.config.mjs 593 B

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