perf: Fix LCP delay and remove hardcoded polyfill bundle#109
Merged
vibemarketerpromax merged 1 commit intomainfrom Feb 19, 2026
Merged
perf: Fix LCP delay and remove hardcoded polyfill bundle#109vibemarketerpromax merged 1 commit intomainfrom
vibemarketerpromax merged 1 commit intomainfrom
Conversation
- Remove opacity:0 initial state from hero CSS animations. The browser won't count invisible elements as LCP, so setting opacity:0 in CSS delayed LCP from 1.2s (FCP) to 2.9s (animation completion). Using animation-fill-mode: both lets keyframes handle the 0→1 transition without an explicit initial invisible state. - Filter out Next.js hardcoded polyfill-nomodule CopyFilePlugin. Next.js unconditionally bundles a 68 KiB polyfill chunk (Array.at, flat, Object.fromEntries, etc.) via CopyFilePlugin regardless of browserslist. Our targets (Chrome 109+, Safari 17+, Firefox 115+) don't need these. The previous polyfill-module alias only removed the smaller 1.4 KiB file.
Deploying website with
|
| Latest commit: |
670eeb4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9342ea88.website-yiq.pages.dev |
| Branch Preview URL: | https://perf-lighthouse-prometheus-v.website-yiq.pages.dev |
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.
Summary
opacity: 0as initial state, which prevented the browser from counting hero elements as LCP until animation completed (~1.7s delay). Switched toanimation-fill-mode: bothwhich lets keyframes handle the opacity transition without an explicit invisible initial state.polyfill-nomodulechunk viaCopyFilePluginregardless of browserslist targets. Our previous alias only removed the smallerpolyfill-module(1.4 KiB). This filters out the CopyFilePlugin entirely, eliminating 13 KiB of legacy JS warnings and ~26 KiB of unused JS.Expected impact
Test plan
/services/prometheus-monitoring— LCP should drop to ~1.2s