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 // to prevent database connection attempts
serverComponentsExternalPackages: ['mongoose'], serverComponentsExternalPackages: ['mongoose'],
}, },
// Disable server-side rendering during build for specific pages that require DB access // For App Router, use generateStaticParams in your page components
// This prevents connection attempts during build // instead of exportPathMap
exportPathMap: async function() {
return {
'/': { page: '/dashboard' },
// Add other static pages here
};
},
async redirects() { async redirects() {
return [ return [
{ // we redirect '/' to '/dashboard { // we redirect '/' to '/dashboard