Live · status OK
Back to blog
Entwicklung12 min

Next.js Static Export und Core Web Vitals: das 2026 Playbook

TL;DR

Um 95+ PageSpeed Mobile auf Next.js Static Export zu erreichen: Fonts selbst hosten via raw @font-face, LCP-Font mit fetchPriority=high preloaden, Framer Motion above-the-fold vermeiden, nur transform/opacity für Animationen, Layout-Platz für i18n-Inhalte reservieren, hinter Cloudflare Free Tier servieren.

Julien Daniel
ByJulien Daniel
Founder & CTO, OptionWeb
Share
PageSpeed Insights Dashboard mit hohen Performance-Scores

Nach 12 Monaten Produktionsdaten auf 40+ Next.js Sites mit Static Export, hier das exakte Playbook für 95+ PageSpeed Mobile. Keine Theorie — nur was messbar funktioniert.

Baseline: Was Static Export kostenlos liefert

Eine Vanilla Next.js Static Export Site erreicht 95-100 Mobile, weil HTML vorgerendert ist, niedriges TTFB, keine Cold Starts. Sobald Sie Framer Motion, Google Fonts, Icons, Analytics hinzufügen, fallen Sie auf 70-85.

LCP: Kampf gegen render-blocking CSS

PageSpeed-Berichte zeigen dasselbe Problem: zwei render-blocking CSS-Dateien fügen ~500ms Render-Verzögerung hinzu. Das ist 100% des LCP-Budgets.

styles/globals.csscss
@font-face {
  font-family: 'Space Grotesk';
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
}

Font-Strategie, die wirklich funktioniert

  • Display Font (Headings)1 Variable Font via raw @font-face, 500-700, preload fetchPriority=high.
  • Body Fontnext/font/google Inter mit 2 Weights (400, 600), nur latin.
  • Monospacenext/font/google JetBrains Mono, preload=false.

INP: Framer-Motion-Fallstricke

tsx
// ❌ Schlecht: verzögert LCP
<motion.h1 initial={{ opacity: 0 }} animate={{ opacity: 1 }}>Titel</motion.h1>

// ✅ Gut: CSS-Keyframe, null JS-Verzögerung
<h1 className="ow-anim-fade-up">Titel</h1>

Regeln: nie width/height/top/left animieren. Nur transform/opacity. Max 1-2 Animationen pro Viewport. useReducedMotion.

CLS: i18n-Reservierungsmuster

Auf i18n-Sites erscheint CLS, wenn Übersetzungen nach Initial Render laden. Lösung: min-height pro Breakpoint reservieren.

tsx
<div className="min-h-[280px] sm:min-h-[220px] md:min-h-[160px] lg:min-h-[130px]">
  <p>{t('tldr.content')}</p>
</div>

Bilder: AVIF, priority, fetchPriority

next.config.jsjs
images: { unoptimized: true, formats: ['image/avif', 'image/webp'] }

Hosting: Brotli 11, HTTP/3, Early Hints

  1. Origin Hostjeder Static Host.
  2. Cloudflare Free Tier davorHTTP/3 QUIC, Brotli 11, Edge Cache.
  3. Early Hints (103)eliminiert TTFB-Wait aus Critical Path.
  4. Cache Rule _next/static/*Cache Everything, Edge TTL 1 Jahr.
  5. Purge Cache on Deploywrangler oder Cloudflare API in CI.

PageSpeed-Regression debuggen

  1. PageSpeed-Berichte vergleichenwelche Metrik fiel.
  2. Critical Request Chainwas blockiert jetzt das Rendern.
  3. Chrome DevTools Performancelocalhost mit Throttling.
  4. Git diff depsneues npm Package?
  5. next build outputRoute +20KB = verdächtig.
Tags#nextjs#performance#core-web-vitals#pagespeed#framer-motion