Problem
Core Web Vitals are a ranking signal, and several build/loading choices work against them.
1. Minification is disabled
vite.config.js
build: {
minify: false,
...
}
Result:
$ du -h dist/assets/components-*.js
1.5M dist/assets/components-8DxwRGCF.js
$ du -sh dist/assets
3.5M dist/assets
A 1.5 MB unminified main chunk. Since the site is also CSR-only, nothing renders until that chunk is downloaded, parsed, and executed — so this directly gates LCP, and it makes each Googlebot render pass expensive (which matters for render-budget scheduling).
If minify: false is intentional so people can read the source, source maps are the better tool — they give readable sources on demand without shipping 1.5 MB to every visitor.
2. Two render-blocking third-party stylesheets
partials/head.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@4/animate.min.css" />
Both are render-blocking and both require a fresh DNS + TLS handshake to cdn.jsdelivr.net before the page can paint. Additionally:
- font-awesome 4 is end-of-life (last release 2016) and pulls a full icon webfont for a handful of icons (
fa-bars, fa-arrow-left). Inline SVGs would drop the font entirely.
- animate.css is loaded on every page for the sidebar's
fadeInLeft/fadeOutLeft. Two keyframes worth of CSS could be copied into styles/styles.scss.
Self-hosting or eliminating both removes a third-party origin from the critical path.
3. No resource hints
No preconnect/dns-prefetch for any third-party origin: cdn.jsdelivr.net, Algolia (*.algolia.net / *.algolianet.com for DocSearch), analytics.limonte.dev, ghbtns.com, api.github.com, api.npmjs.org. The Header.tsx stats block fires three cross-origin fetch calls on mount with no hint at all.
At minimum:
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<link rel="preconnect" href="https://XXXXXXX-dsn.algolia.net" crossorigin />
4. Sandpack on every recipe page
@codesandbox/sandpack-react is bundled into all 21 recipe pages and is the dominant cost there. Worth deferring until the editor scrolls into view (or until interaction), with a static <pre><code> block rendered first — which also gives those pages crawlable content (see the thin-content issue).
Suggested fix
In priority order:
- Turn minification back on (
minify: 'esbuild' or default) and ship source maps instead.
- Drop font-awesome for inline SVG icons; inline the two animate.css keyframes.
- Add
preconnect hints for whatever third-party origins remain.
- Lazy-mount Sandpack.
Measure before/after with PageSpeed Insights on / and one recipe page.
Impact
Medium-high — item 1 alone is a one-line change with a large effect on LCP.
Problem
Core Web Vitals are a ranking signal, and several build/loading choices work against them.
1. Minification is disabled
vite.config.jsResult:
A 1.5 MB unminified main chunk. Since the site is also CSR-only, nothing renders until that chunk is downloaded, parsed, and executed — so this directly gates LCP, and it makes each Googlebot render pass expensive (which matters for render-budget scheduling).
If
minify: falseis intentional so people can read the source, source maps are the better tool — they give readable sources on demand without shipping 1.5 MB to every visitor.2. Two render-blocking third-party stylesheets
partials/head.htmlBoth are render-blocking and both require a fresh DNS + TLS handshake to
cdn.jsdelivr.netbefore the page can paint. Additionally:fa-bars,fa-arrow-left). Inline SVGs would drop the font entirely.fadeInLeft/fadeOutLeft. Two keyframes worth of CSS could be copied intostyles/styles.scss.Self-hosting or eliminating both removes a third-party origin from the critical path.
3. No resource hints
No
preconnect/dns-prefetchfor any third-party origin:cdn.jsdelivr.net, Algolia (*.algolia.net/*.algolianet.comfor DocSearch),analytics.limonte.dev,ghbtns.com,api.github.com,api.npmjs.org. TheHeader.tsxstats block fires three cross-originfetchcalls on mount with no hint at all.At minimum:
4. Sandpack on every recipe page
@codesandbox/sandpack-reactis bundled into all 21 recipe pages and is the dominant cost there. Worth deferring until the editor scrolls into view (or until interaction), with a static<pre><code>block rendered first — which also gives those pages crawlable content (see the thin-content issue).Suggested fix
In priority order:
minify: 'esbuild'or default) and ship source maps instead.preconnecthints for whatever third-party origins remain.Measure before/after with PageSpeed Insights on
/and one recipe page.Impact
Medium-high — item 1 alone is a one-line change with a large effect on LCP.