Remove exportPathMap for App Router compatibility

This commit is contained in:
yznahmad 2025-06-20 03:20:11 +03:00
parent 0256b96365
commit 78a37fba64

View File

@ -11,14 +11,8 @@ const nextConfig = {
// to prevent database connection attempts
serverComponentsExternalPackages: ['mongoose'],
},
// Disable server-side rendering during build for specific pages that require DB access
// This prevents connection attempts during build
exportPathMap: async function() {
return {
'/': { page: '/dashboard' },
// Add other static pages here
};
},
// For App Router, use generateStaticParams in your page components
// instead of exportPathMap
async redirects() {
return [
{ // we redirect '/' to '/dashboard