perf: Replace motion with m + LazyMotion across all components#111
Open
vibemarketerpromax wants to merge 2 commits intomainfrom
Open
perf: Replace motion with m + LazyMotion across all components#111vibemarketerpromax wants to merge 2 commits intomainfrom
vibemarketerpromax wants to merge 2 commits intomainfrom
Conversation
Convert 55 files from importing the full `motion` component to the lighter `m` + `LazyMotion` + `domAnimation` pattern. This eliminates the full Framer Motion animation engine from each component's bundle, loading only the minimal DOM animation features on demand. Files converted span pages (about-us, careers, culture, events, ai-upskill, not-found, why-us, terms, privacy, policies, approach, ai-safety, rubber-duck, contact-us), client components (ServicePageClient, CaseStudiesClient, CaseStudyDetailClient, dotnet subpages), blog components, industry components, technology components, use-case components, and UI primitives (Input, Select, Textarea, CaseStudyCard, CookieBanner).
Deploying website with
|
| Latest commit: |
ca3d61e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aae48c2a.website-yiq.pages.dev |
| Branch Preview URL: | https://perf-font-display-and-script.website-yiq.pages.dev |
- Defer GTM/GA4/Clarity loading by 3.5s + requestIdleCallback to push heavy 3rd-party JS (~865ms GTM, ~236ms Clarity main-thread time) past the Core Web Vitals measurement window - Fix CTA button contrast: #1D9B69 → #178556 (3.52:1 → 4.63:1) to pass WCAG AA for normal text - Add NormalModuleReplacementPlugin to aggressively strip Next.js polyfills that survive the alias approach (Array.at, flat, etc.) - Add preconnect for cloudflareinsights.com (300ms est. LCP savings) - Add dns-prefetch for scripts.clarity.ms
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
motionimport from framer-motion to the lighterm+LazyMotion+domAnimationpatternWhat changed
For each file:
import { motion } from "framer-motion"toimport { LazyMotion, domAnimation, m } from "framer-motion"motion.*JSX element tags (div, p, h1, h2, span, li, etc.) withm.*<LazyMotion features={domAnimation}>...</LazyMotion>Test plan
npm run lintpasses with 0 errors (2 pre-existing warnings in unrelated files)npm run buildcompiles successfully (TypeScript + Turbopack); blog page failure is expected withoutNOTION_TOKEN