Skip to content

Conversation

@spathon
Copy link
Owner

@spathon spathon commented Jan 17, 2026

Performance improvements:

  • Self-host Google Fonts using @fontsource to eliminate external requests
  • Add font-display: swap for faster text rendering
  • Configure comprehensive Vite build optimizations:
    • CSS code splitting for better caching
    • Manual chunk splitting (vendor, preact-iso)
    • Gzip and Brotli compression plugins
    • Bundle size analyzer (generates stats.html)
    • Optimized minification and asset inlining
  • Add DNS prefetch for Google Analytics

Results:

  • Reduced external font requests from 1 to 0
  • JS split into optimized chunks (~14KB total gzipped)
  • CSS compressed from 49KB to 21KB (brotli)
  • Generated pre-compressed .gz and .br files for CDN

Performance improvements:
- Self-host Google Fonts using @fontsource to eliminate external requests
- Add font-display: swap for faster text rendering
- Configure comprehensive Vite build optimizations:
  * CSS code splitting for better caching
  * Manual chunk splitting (vendor, preact-iso)
  * Gzip and Brotli compression plugins
  * Bundle size analyzer (generates stats.html)
  * Optimized minification and asset inlining
- Add DNS prefetch for Google Analytics

Results:
- Reduced external font requests from 1 to 0
- JS split into optimized chunks (~14KB total gzipped)
- CSS compressed from 49KB to 21KB (brotli)
- Generated pre-compressed .gz and .br files for CDN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants