Files
such.software/apps/web/next.config.js
jwinterm 89c086398d Fix mobile LCP at the source: inline CSS + drop competing image preloads
LCP breakdown showed TTFB 0ms and Element render delay ~2,320ms: the data-URI logo
was ready instantly but couldn't paint until the render-blocking CSS request finished,
and that round-trip varied wildly on throttled 4G (LCP 2.3s -> 6.8s, same code). This
is why the score bounced 71<->96 with no code change.

- experimental.inlineCss: fold the 64 KB CSS into the HTML so there is no separate
  render-blocking stylesheet request on the critical path. Verified: homepage HTML
  now has the CSS inline and zero <link rel=stylesheet>.
- Drop the two header-logo image preloads (both theme variants) that were stealing
  slow-4G bandwidth from the critical path; the header wordmark is not the LCP and is
  hidden during the splash.
2026-06-07 17:02:35 -04:00

23 lines
723 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["@repo/ui"],
// Inline the CSS into the HTML so the render-blocking stylesheet request leaves the
// critical path. That request was the LCP gate on throttled mobile: the logo (a data
// URI, ready instantly) couldn't paint until the separate CSS round-trip finished,
// and that round-trip varied run-to-run (TTFB 0, render delay ~2.3s). Inlined CSS
// arrives with the HTML, so the logo paints right away.
experimental: {
inlineCss: true,
},
async redirects() {
return [
{
source: "/links",
destination: "/apps",
permanent: true,
},
];
},
};
module.exports = nextConfig;