Skip to content

Task/4#299

Open
nozaryo8 wants to merge 7 commits intoCyberAgentHack:mainfrom
nozaryo8:task/4
Open

Task/4#299
nozaryo8 wants to merge 7 commits intoCyberAgentHack:mainfrom
nozaryo8:task/4

Conversation

@nozaryo8
Copy link
Copy Markdown

No description provided.

nozaryo8 and others added 7 commits March 20, 2026 11:39
⭐️ 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
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.

1 participant