QR-master/next.config.mjs

60 lines
1.6 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
skipTrailingSlashRedirect: true,
images: {
unoptimized: false,
domains: ['www.qrmaster.net', 'qrmaster.net', 'images.qrmaster.net'],
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
experimental: {
serverComponentsExternalPackages: ['@prisma/client', 'bcryptjs'],
},
// Allow build to succeed even with prerender errors
// Pages with useSearchParams() will be rendered dynamically at runtime
staticPageGenerationTimeout: 120,
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
poweredByHeader: false,
async redirects() {
return [
{
source: '/blog/bulk-qr-codes-excel',
destination: '/blog/bulk-qr-code-generator-excel',
permanent: true,
},
{
source: '/blog/vcard-qr-code-generator',
destination: '/tools/vcard-qr-code',
permanent: true,
},
{
source: '/blog/qr-code-restaurant-menu',
destination: '/dynamic-qr-code-generator',
permanent: true,
},
{
source: '/blog/bulk-qr-code-generator',
destination: '/bulk-qr-code-generator',
permanent: true,
},
{
source: '/blog/qr-code-small-business',
destination: '/signup',
permanent: true,
},
{
source: '/analytics',
destination: '/signup',
permanent: false, // 307 Temporary Redirect as it requires auth eventually
},
];
},
};
export default nextConfig;