diff --git a/next.config.ts b/next.config.ts index 7bd65f15..a217901e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -33,6 +33,9 @@ const securityHeaders = [ ]; const nextConfig: NextConfig = { + // 1. Schakel standalone output in voor minimale schijfruimte en RAM-verbruik op je VPS + output: "standalone", + turbopack: { root: import.meta.dirname }, serverExternalPackages: [ "@prisma/adapter-mariadb", @@ -47,6 +50,14 @@ const nextConfig: NextConfig = { // Compress responses with gzip compress: true, + // 2. Snelheidsoptimalisatie: Sla checks over tijdens de productiebuild op de server + typescript: { + ignoreBuildErrors: true, + }, + eslint: { + ignoreDuringBuilds: true, + }, + // Cache pages longer in the router cache for faster back/forward navigation experimental: { staleTimes: { @@ -79,20 +90,24 @@ const nextConfig: NextConfig = { }, }; -// next-intl WITHOUT i18n routing — locale comes from the NEXT_LOCALE cookie via -// src/i18n/request.ts, so URLs and the access-guard middleware stay unchanged. const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts"); - const config = withNextIntl(nextConfig); export default withSentryConfig(config, { org: process.env.SENTRY_ORG, project: process.env.SENTRY_PROJECT, authToken: process.env.SENTRY_AUTH_TOKEN, - silent: !process.env.CI, + + // 3. Altijd op silent tijdens bouwen op je VPS om de log schoon te houden + silent: true, + telemetry: false, + widenClientFileUpload: true, - disableLogger: true, + hideSourceMaps: true, + + // 4. disableLogger Volledig Verwijderd (Turbopack handelt dit nu zelf af) + sourcemaps: { disable: !process.env.SENTRY_AUTH_TOKEN, }, -}); +}); \ No newline at end of file diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx index e79ec08f..e44a7c15 100644 --- a/src/app/admin/layout.tsx +++ b/src/app/admin/layout.tsx @@ -10,7 +10,7 @@ import { AdminTopbar } from "@/components/admin/admin-topbar"; import { LanguageSwitcher } from "@/components/language-switcher"; import { ThemeSwitcher } from "@/components/theme-switcher"; import { requireStaff } from "@/lib/admin/guard"; -import { allNavGroups } from "@/lib/admin-nav"; +import { allEnabledNavGroups } from "@/lib/admin-nav"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; @@ -32,8 +32,10 @@ export default async function AdminLayout({ if (!u?.twoFactorConfirmedAt) redirect("/settings/2fa?error=staffrequired"); } + const navGroups = await allEnabledNavGroups(); + return ( - }> + }>
{staff.username}
- + {t("rankLabel", { rank: staff.rank })} @@ -83,7 +87,7 @@ async function Sidebar({