Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🏗️ Build (push) Successful in 12m46s
Build & Deploy / 🚀 Deploy (push) Successful in 20s
Build & Deploy / 🩺 Smoke Test (push) Failing after 3s
Build & Deploy / 🔔 Notify (push) Successful in 7s
Nightly QA / 🔍 Static Analysis (push) Successful in 2m36s
Nightly QA / 🔗 Links & Deps (push) Successful in 2m13s
Nightly QA / 🎭 Lighthouse (push) Successful in 3m47s
Nightly QA / 📝 E2E (push) Successful in 4m28s
Nightly QA / 🔔 Notify (push) Has been skipped
58 lines
1.4 KiB
JavaScript
58 lines
1.4 KiB
JavaScript
import withMintelConfig from "@mintel/next-config";
|
|
import { withPayload } from '@payloadcms/next/withPayload';
|
|
import createMDX from '@next/mdx';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const filename = fileURLToPath(import.meta.url);
|
|
const dirname = path.dirname(filename);
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
serverExternalPackages: [
|
|
'canvas',
|
|
'sharp',
|
|
'puppeteer',
|
|
'require-in-the-middle',
|
|
'import-in-the-middle'
|
|
],
|
|
transpilePackages: [
|
|
'@mintel/content-engine',
|
|
'@mintel/concept-engine',
|
|
'@mintel/estimation-engine',
|
|
'@mintel/meme-generator',
|
|
'@mintel/payload-ai',
|
|
'@mintel/pdf',
|
|
'@mintel/thumbnail-generator'
|
|
],
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '*.your-objectstorage.com',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'fsn1.your-objectstorage.com',
|
|
},
|
|
],
|
|
},
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: '/case-studies/klz',
|
|
destination: '/case-studies/klz-cables',
|
|
permanent: true,
|
|
},
|
|
];
|
|
},
|
|
// In Standalone mode, Next.js expects the tracing root to be the monorepo root
|
|
outputFileTracingRoot: path.join(dirname, '../../'),
|
|
};
|
|
|
|
const withMDX = createMDX({});
|
|
|
|
// Clean, standard wrapper application
|
|
// Rewrites are now handled by src/middleware.ts for maximum robustness
|
|
export default withPayload(withMintelConfig(withMDX(nextConfig)));
|