Skip to content

Conversation

@sergeyplis
Copy link
Contributor

Mainly modifying vite config

  - Change base path from '/' to './' in vite.config.js
  - Enable compression with gzip and brotli
  - Optimize chunk splitting for better caching
  - Add resource hints for faster loading
  ✨ Performance improvements:
  - Add gzip + brotli compression (87% size reduction)
  - Split bundles: vendor-tf (1.5M), vendor-niivue (700K), vendor-compression (1.3M)
  - Add resource hints for faster external CDN connections
  - Generate 20 .gz + 19 .br compressed files for better GitHub Pages delivery

  🔧 Technical changes:
  - Configure vite-plugin-compression for dual compression
  - Implement intelligent manualChunks for better caching
  - Add DNS prefetch and preconnect hints
  - Maintain absolute paths for brainchop.org custom domain
  - Change niivue.css from absolute to relative paths
  - Keep JS assets as absolute paths for custom domain
  - CSS now loads from ./niivue.css instead of /niivue.css
  - Resolves 404 error for CSS file
@sergeyplis sergeyplis merged commit 750fc96 into master Aug 8, 2025
3 checks passed
@sergeyplis sergeyplis deleted the optimize-performance branch August 8, 2025 22:57
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.

2 participants