feat: payload cms
This commit is contained in:
@@ -4,7 +4,7 @@ import { withSentryConfig } from '@sentry/nextjs';
|
||||
|
||||
import { withPayload } from '@payloadcms/next/withPayload';
|
||||
|
||||
console.log('🚀 NEXT CONFIG LOADED FROM:', process.cwd());
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
onDemandEntries: {
|
||||
@@ -22,7 +22,7 @@ const nextConfig = {
|
||||
fullUrl: true,
|
||||
},
|
||||
},
|
||||
output: 'standalone',
|
||||
...(isProd ? { output: 'standalone' } : {}),
|
||||
async headers() {
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
const umamiDomain = new URL(process.env.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me').origin;
|
||||
@@ -430,6 +430,13 @@ const withAnalyzer = withBundleAnalyzer({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
});
|
||||
|
||||
export default withPayload(withAnalyzer(withMintelConfig(nextConfig, {
|
||||
hideSourceMaps: true,
|
||||
})));
|
||||
// withMintelConfig internally sets output:'standalone' and wraps with withSentryConfig.
|
||||
// In dev mode, standalone triggers @vercel/nft file tracing on every compile through
|
||||
// VirtioFS, which hammers CPU. Strip it for dev.
|
||||
let resolvedConfig = withPayload(withAnalyzer(withMintelConfig(nextConfig)));
|
||||
|
||||
if (!isProd) {
|
||||
delete resolvedConfig.output;
|
||||
}
|
||||
|
||||
export default resolvedConfig;
|
||||
|
||||
Reference in New Issue
Block a user