fix website build

This commit is contained in:
2025-12-25 12:54:08 +01:00
parent ac083363bc
commit 722a185dd9
26 changed files with 1712 additions and 1419 deletions

View File

@@ -15,6 +15,11 @@ import { getAppMode, isPublicRoute } from './lib/mode';
export function middleware(request: NextRequest) {
const mode = getAppMode();
const { pathname } = request.nextUrl;
// Always allow Next.js error routes (needed for build/prerender)
if (pathname === '/404' || pathname === '/500' || pathname === '/_error') {
return NextResponse.next();
}
// In alpha mode, allow all routes
if (mode === 'alpha') {
@@ -46,6 +51,6 @@ export const config = {
* - favicon.ico (favicon file)
* - public folder files
*/
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|mp4|webm|mov|avi)$).*)',
'/((?!_next/static|_next/image|_next/data|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|mp4|webm|mov|avi)$).*)',
],
};