From f5107922a06dbde13ffe9824e26ffa8fabfef68c Mon Sep 17 00:00:00 2001 From: Marco Sadjadi Date: Thu, 21 May 2026 19:57:30 +0200 Subject: [PATCH] perf(web): inline CSS + modern browserslist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - experimental.inlineCss: drop the render-blocking CSS request — the Tailwind bundle is inlined into the HTML head (faster FCP/LCP on mobile). - browserslist pinned to modern engines so Next/SWC stops emitting polyfills for Baseline features (Array.at, Object.fromEntries, …). Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/web/next.config.mjs | 3 +++ apps/web/package.json | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index cc6f583..ed86c26 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -4,6 +4,9 @@ const nextConfig = { transpilePackages: ['@bmm/types'], experimental: { typedRoutes: false, + // Inline the CSS into the HTML so it is not a render-blocking + // request — improves FCP/LCP, especially on slow mobile connections. + inlineCss: true, }, async rewrites() { return [ diff --git a/apps/web/package.json b/apps/web/package.json index 36c3384..7772439 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -20,6 +20,12 @@ "tailwind-merge": "2.5.5", "zod": "3.25.76" }, + "browserslist": [ + "chrome >= 111", + "edge >= 111", + "firefox >= 111", + "safari >= 16.4" + ], "devDependencies": { "@tailwindcss/postcss": "4.0.0-beta.7", "@types/node": "22.10.2",