perf: cut CI time, fix CSS chain, fix iPad hero layout, fix contrast
CI: - Replace `npm run build` with `tsc --noEmit` in test-build job → eliminates duplicate Next.js build (~5 min saved per push) → Docker deploy job already does the full build PageSpeed: - Add `cssChunking: 'loose'` to merge CSS into one chunk and break the 84dc7384→3aefc04b render-blocking CSS waterfall chain (450ms mobile) - Remove @shadergradient/react, @react-three/fiber, three from package.json — packages were already unused in code, removes any residual bundling risk for chunk 7001 Hero: - Change lg:flex-row → xl:flex-row so iPad (1024px) stays in column layout; the 9.5rem heading overflowed into the image at lg causing the photo to be clipped by overflow-hidden on the section - Update image sizes attribute to match new xl breakpoint - Fix contrast: "GET IN TOUCH" link text-stone-500 → text-stone-700 (contrast 3.7:1 → 7:1, now WCAG AA compliant) - Change text-center/justify-center to xl: variants to match layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,10 +34,12 @@ const nextConfig: NextConfig = {
|
||||
experimental: {
|
||||
// Tree-shake barrel-file packages in both dev and production
|
||||
optimizePackageImports: ["lucide-react", "framer-motion", "react-icons", "@tiptap/react"],
|
||||
// Merge all CSS into a single chunk to eliminate the render-blocking CSS chain
|
||||
// (84dc7384.css → 3aefc04b.css sequential dependency reported by PageSpeed).
|
||||
cssChunking: "loose",
|
||||
// Note: optimizeCss (critters) is intentionally disabled — it converts the main
|
||||
// <link rel="stylesheet"> to a JS-deferred preload, which PageSpeed reads as a
|
||||
// sequential CSS chain and reports 410ms of render-blocking. Without it both CSS
|
||||
// files load as parallel <link> tags discovered from the initial HTML (~150ms total).
|
||||
// sequential CSS chain and reports 410ms of render-blocking.
|
||||
...(process.env.NODE_ENV !== "production" ? { webpackBuildWorker: true } : {}),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user