mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 19:44:12 +00:00
Breaking changes addressed: - Migrate middleware.ts → proxy.ts (Next.js 16 deprecation) - Remove eslint config from next.config.mjs (moved to eslint.config.mjs) - Add turbopack.resolveAlias for TypeScript/ESM compatibility - Use --webpack flag for production builds (Turbopack stable in 16.1.0) Notes: - @payloadcms/next peer dependency warning (expects Next.js 15.x) - Turbopack used for development, Webpack for production builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
// Skip type checking during build (done separately in CI)
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
// Note: ESLint config moved to eslint.config.mjs (Next.js 16 requirement)
|
|
// Run lint separately via: pnpm lint
|
|
// Reduce memory usage during build
|
|
experimental: {
|
|
// Use fewer workers for builds on low-memory systems
|
|
workerThreads: false,
|
|
cpus: 1,
|
|
},
|
|
// Turbopack configuration (Next.js 16 default bundler)
|
|
turbopack: {
|
|
resolveAlias: {
|
|
// Extension aliases for TypeScript/ESM compatibility
|
|
'.cjs': ['.cts', '.cjs'],
|
|
'.js': ['.ts', '.tsx', '.js', '.jsx'],
|
|
'.mjs': ['.mts', '.mjs'],
|
|
},
|
|
},
|
|
// Webpack fallback configuration (for --webpack flag)
|
|
webpack: (webpackConfig) => {
|
|
webpackConfig.resolve.extensionAlias = {
|
|
'.cjs': ['.cts', '.cjs'],
|
|
'.js': ['.ts', '.tsx', '.js', '.jsx'],
|
|
'.mjs': ['.mts', '.mjs'],
|
|
}
|
|
|
|
return webpackConfig
|
|
},
|
|
}
|
|
|
|
export default withPayload(nextConfig, { devBundleServerPackages: false })
|