Open
Conversation
⭐️ CRITICAL FIX: Font Optimization (+100-150pt expected) - Problem: 6.7MB fonts blocking LCP=0 on all pages - Solution: Aggressive subset (ASCII+Hiragana+Katakana only) - Result: 6.7MB → 35KB (99.5% reduction, 191x smaller) - Removed HTML preload tags for natural browser loading - Added immutable cache headers (1 year) Webpack Bundle Optimization (+70-100pt expected) - Entrypoint: 71.6MB → 646KB (99% reduction) - main.js: 589KB → 22KB (97% reduction) - React vendor chunk: 340KB separate - Binary assets (ffmpeg/imagemagick): async chunks only - splitChunks: 'all' with maxSize: 500KB Babel Target Modernization - Changed from 'last 2 versions' → 'Chrome 133' - Smaller polyfills, modern JS output Modified Files: - client/src/index.html - Removed font preload - client/src/index.css - Single subset font - client/webpack.config.js - Advanced splitChunks - client/babel.config.js - Modern target - server/src/app.ts - Font cache headers - public/fonts/ - Optimized 35KB subset font Expected Impact: 433pt → 600-680pt (+170-250pt) Main Win: LCP=0 issue resolved
- Reverted webpack splitChunks from 'all' back to 'async' - Reverted babel targets from 'Chrome 133' back to multi-browser - Keep font optimization (6.7MB → 35KB) - Keep Phase 2 optimizations (lodash/pako/bluebird removal) - Fix 401 Unauthorized error on /api/v1/me
Based on https://github.com/Garume/web-speed-hackathon-2026 Critical improvements to fix session auth with chunks: 'all': - runtimeChunk: 'single' - Isolate runtime for proper initialization - default/defaultVendors: false - Disable defaults for fine control - framework cacheGroup (priority 40) - Explicit React/Redux bundle - ffmpeg as async chunk (priority 30) - Lazy load 41MB binary Webpack optimizations: - moduleIds/chunkIds: 'deterministic' - Stable IDs for caching - File naming: [name]-[contenthash] for all assets - inject: 'body' - Auto-inject scripts (remove manual tags) - cache: filesystem - Faster rebuilds Babel optimization: - Removed @babel/preset-env - Reduce unnecessary polyfills - Target modern browsers only Results: - Entrypoint: 657 KB (runtime 5.4 KB + framework 429 KB + main 168 KB) - main.js: 589 KB → 168 KB (71% reduction!) - ffmpeg: 41 MB (async, not in initial load) Expected impact: +50-80 points (TBT reduction, better caching)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.