diff --git a/app/global-error.tsx b/app/global-error.tsx index 8047e10d6..12812042d 100644 --- a/app/global-error.tsx +++ b/app/global-error.tsx @@ -1,6 +1,5 @@ 'use client'; -import * as Sentry from '@sentry/nextjs'; import Error from 'next/error'; import { useEffect } from 'react'; @@ -10,7 +9,9 @@ export default function GlobalError({ error: Error & { digest?: string }; }) { useEffect(() => { - Sentry.captureException(error); + import('@sentry/nextjs').then((Sentry) => { + Sentry.captureException(error); + }); }, [error]); return ( diff --git a/bundle-stats.json b/bundle-stats.json new file mode 100644 index 000000000..38d9645c3 --- /dev/null +++ b/bundle-stats.json @@ -0,0 +1,48 @@ +.next/static/chunks/0b521531212fbb38.js +.next/static/chunks/0c4bd4931d57e66a.js +.next/static/chunks/114976d6e8233fa6.js +.next/static/chunks/163f657a16afbe5e.js +.next/static/chunks/1c2f1bc547a6b6db.js +.next/static/chunks/2583fa7802927c7b.js +.next/static/chunks/30da1bf4e9770388.js +.next/static/chunks/38b815a6d50481c3.js +.next/static/chunks/3dc2f63532eb2144.js +.next/static/chunks/3e327b4e2347bc0f.js +.next/static/chunks/3ef3cefd2dae1060.js +.next/static/chunks/45499dd88f8aa0be.js +.next/static/chunks/4b9828b23c1decfd.js +.next/static/chunks/4c801febc70daa53.js +.next/static/chunks/4d5ea13dba62fe42.js +.next/static/chunks/4dffe404993f353e.js +.next/static/chunks/4f185d0c413fdb9e.js +.next/static/chunks/4f69e8e09eeae4d6.js +.next/static/chunks/4fa8be7f170d31f3.js +.next/static/chunks/583b451485662887.js +.next/static/chunks/5e1e2d5c357c1b57.js +.next/static/chunks/6216b234a7a88a60.js +.next/static/chunks/651fbbae0062342b.js +.next/static/chunks/66a1b90666fc2830.js +.next/static/chunks/6c0ddf2fd63ab912.js +.next/static/chunks/72cf73de45fde6cf.js +.next/static/chunks/75ea3a278c540e05.js +.next/static/chunks/77a84d4dc662b7cf.js +.next/static/chunks/7c603cfd5a61abd1.js +.next/static/chunks/84ddf763fbc98e13.js +.next/static/chunks/885c97d656f95ebd.js +.next/static/chunks/8d6ae249fcc5e38f.js +.next/static/chunks/920f860e909b2eb8.js +.next/static/chunks/951d03271d663d8a.js +.next/static/chunks/a094276392fca24a.js +.next/static/chunks/a2e7fbe3f294caac.js +.next/static/chunks/a6c9d757034eb86a.js +.next/static/chunks/a6dc76eec9924929.js +.next/static/chunks/c3f21c4df538784a.js +.next/static/chunks/c641ee8514fa0552.js +.next/static/chunks/d8c0ef20e0ad9790.js +.next/static/chunks/e60e6d615bf7d2f5.js +.next/static/chunks/e714b6ccaf8d5f12.js +.next/static/chunks/eeebcf8c8de1a29a.js +.next/static/chunks/f0b47c1f19d25fd2.js +.next/static/chunks/f8d5b1a2accefb4c.js +.next/static/chunks/fa18a72fd9fb11d5.js +.next/static/chunks/turbopack-2aac2a40101e9988.js diff --git a/components/Lightbox.tsx b/components/Lightbox.tsx index 5361c210a..1d412cceb 100644 --- a/components/Lightbox.tsx +++ b/components/Lightbox.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useState, useCallback, useRef } from 'react'; import Image from 'next/image'; import { createPortal } from 'react-dom'; -import { m, LazyMotion, AnimatePresence } from 'framer-motion'; +import { m, AnimatePresence, LazyMotion } from 'framer-motion'; import { useRouter, useSearchParams, usePathname } from 'next/navigation'; interface LightboxProps { diff --git a/components/annotator-local/Annotator.tsx b/components/annotator-local/Annotator.tsx index b799e3a6a..a42029eba 100644 --- a/components/annotator-local/Annotator.tsx +++ b/components/annotator-local/Annotator.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useMemo } from "react"; -import { AnimatePresence, m, LazyMotion, domAnimation } from 'framer-motion'; +import { AnimatePresence, m } from 'framer-motion'; import { MessageSquare, X, Check, Image as ImageIcon, Type, StickyNote, Download, Trash2, List } from "lucide-react"; import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; diff --git a/components/blocks/BenefitGrid.tsx b/components/blocks/BenefitGrid.tsx index 0407f0f5d..7263085a8 100644 --- a/components/blocks/BenefitGrid.tsx +++ b/components/blocks/BenefitGrid.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation, Variants } from 'framer-motion'; +import { m, Variants } from 'framer-motion'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; import { LogoArcs } from '@/components/ui/LogoArcs'; diff --git a/components/blocks/CertificatesBlock.tsx b/components/blocks/CertificatesBlock.tsx index da7351314..c67cba8c7 100644 --- a/components/blocks/CertificatesBlock.tsx +++ b/components/blocks/CertificatesBlock.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState, useEffect } from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { Container } from '@/components/ui/Container'; import { Button } from '@/components/ui/Button'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; diff --git a/components/blocks/CompanyTimeline.tsx b/components/blocks/CompanyTimeline.tsx index 6532cddba..ca5aa0cc5 100644 --- a/components/blocks/CompanyTimeline.tsx +++ b/components/blocks/CompanyTimeline.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { useScroll, useTransform, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useScroll, useTransform, m } from 'framer-motion'; import { Building2, Compass, Layers, ArrowDownToLine, Wrench, Factory, Zap, MapPin, CheckCircle2 } from 'lucide-react'; import { useTranslations } from 'next-intl'; diff --git a/components/blocks/CompetenceBentoGrid.tsx b/components/blocks/CompetenceBentoGrid.tsx index bffced428..b43bcd423 100644 --- a/components/blocks/CompetenceBentoGrid.tsx +++ b/components/blocks/CompetenceBentoGrid.tsx @@ -2,7 +2,7 @@ import Link from 'next/link'; import Image from 'next/image'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { useState, useEffect } from 'react'; import { Button } from '@/components/ui/Button'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; diff --git a/components/blocks/ContactSection.tsx b/components/blocks/ContactSection.tsx index b4405c2ae..8637d931c 100644 --- a/components/blocks/ContactSection.tsx +++ b/components/blocks/ContactSection.tsx @@ -4,7 +4,7 @@ import React, { Suspense } from 'react'; import { Section, Container } from '@/components/ui'; import { ContactForm } from '@/components/forms/ContactForm'; import dynamic from 'next/dynamic'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; const ContactMap = dynamic(() => import('@/components/ContactMap'), { ssr: false, diff --git a/components/blocks/DataGridPulse.tsx b/components/blocks/DataGridPulse.tsx index 084d0941c..f760a9f04 100644 --- a/components/blocks/DataGridPulse.tsx +++ b/components/blocks/DataGridPulse.tsx @@ -1,7 +1,7 @@ 'use client'; import React from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { useLocale } from 'next-intl'; export function DataGridPulse() { diff --git a/components/blocks/DeepDrillAnimation.tsx b/components/blocks/DeepDrillAnimation.tsx index a76707477..dc847716b 100644 --- a/components/blocks/DeepDrillAnimation.tsx +++ b/components/blocks/DeepDrillAnimation.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useRef } from 'react'; -import { useScroll, useTransform, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useScroll, useTransform, m } from 'framer-motion'; import { useLocale } from 'next-intl'; export function DeepDrillAnimation() { diff --git a/components/blocks/GrowthChart.tsx b/components/blocks/GrowthChart.tsx index 20e471bd9..f2f56284d 100644 --- a/components/blocks/GrowthChart.tsx +++ b/components/blocks/GrowthChart.tsx @@ -1,7 +1,7 @@ 'use client'; import React from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { useTranslations } from 'next-intl'; export function GrowthChart() { diff --git a/components/blocks/HeroSection.tsx b/components/blocks/HeroSection.tsx index 8578e29da..e3ec92c5e 100644 --- a/components/blocks/HeroSection.tsx +++ b/components/blocks/HeroSection.tsx @@ -3,7 +3,7 @@ import React from 'react'; import Image from 'next/image'; import { usePathname } from 'next/navigation'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { Badge, Container, Heading } from '@/components/ui'; import { Button } from '@/components/ui/Button'; diff --git a/components/blocks/InteractiveGermanyMap.tsx b/components/blocks/InteractiveGermanyMap.tsx index b29e4e6ab..b07970740 100644 --- a/components/blocks/InteractiveGermanyMap.tsx +++ b/components/blocks/InteractiveGermanyMap.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useState, useRef, useCallback, useMemo } from 'react'; -import { m, LazyMotion, domAnimation, AnimatePresence } from 'framer-motion'; +import { m, AnimatePresence } from 'framer-motion'; import { MapPin, CheckCircle2, ArrowUpRight } from 'lucide-react'; import Image from 'next/image'; import { usePathname } from 'next/navigation'; diff --git a/components/blocks/JobListingBlock.tsx b/components/blocks/JobListingBlock.tsx index 585fbfd00..2876d4f34 100644 --- a/components/blocks/JobListingBlock.tsx +++ b/components/blocks/JobListingBlock.tsx @@ -4,7 +4,7 @@ import React from 'react'; import Link from 'next/link'; import { Button } from '@/components/ui/Button'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { useTranslations } from 'next-intl'; export interface JobListingBlockProps { diff --git a/components/blocks/ReferencesSlider.tsx b/components/blocks/ReferencesSlider.tsx index fc163237a..34ac88e5e 100644 --- a/components/blocks/ReferencesSlider.tsx +++ b/components/blocks/ReferencesSlider.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import Link from 'next/link'; import Image from 'next/image'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; @@ -127,7 +127,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
{/* Carousel: centered first card with peek on both sides */} - +
- +
diff --git a/components/blocks/ScaleOfImpact.tsx b/components/blocks/ScaleOfImpact.tsx index b4c755c2c..df85a5c25 100644 --- a/components/blocks/ScaleOfImpact.tsx +++ b/components/blocks/ScaleOfImpact.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useRef } from 'react'; -import { useScroll, useTransform, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useScroll, useTransform, m } from 'framer-motion'; import { useLocale } from 'next-intl'; export function ScaleOfImpact() { diff --git a/components/blocks/ServiceDetailGrid.tsx b/components/blocks/ServiceDetailGrid.tsx index 27cc4f7dc..6fd0233af 100644 --- a/components/blocks/ServiceDetailGrid.tsx +++ b/components/blocks/ServiceDetailGrid.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation, Variants } from 'framer-motion'; +import { m, Variants } from 'framer-motion'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; export interface ServicePanelData { diff --git a/components/blocks/SubCompanyTiles.tsx b/components/blocks/SubCompanyTiles.tsx index a29ea5044..b303d7f78 100644 --- a/components/blocks/SubCompanyTiles.tsx +++ b/components/blocks/SubCompanyTiles.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation, Variants } from 'framer-motion'; +import { m, Variants } from 'framer-motion'; import Image from 'next/image'; import Link from 'next/link'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; diff --git a/components/blocks/SupportCTA.tsx b/components/blocks/SupportCTA.tsx index 2830aa6fb..a39e3a0ff 100644 --- a/components/blocks/SupportCTA.tsx +++ b/components/blocks/SupportCTA.tsx @@ -3,7 +3,7 @@ import React from 'react'; import TrackedLink from '@/components/analytics/TrackedLink'; import { getButtonClasses, ButtonOverlay } from '@/components/ui/Button'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; export interface SupportCTAProps { title: string; diff --git a/components/blocks/TeamGrid.tsx b/components/blocks/TeamGrid.tsx index b9e7a836f..6d67ae3bc 100644 --- a/components/blocks/TeamGrid.tsx +++ b/components/blocks/TeamGrid.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import Image from 'next/image'; import { useTranslations } from 'next-intl'; diff --git a/components/decorations/CorporateBackground.tsx b/components/decorations/CorporateBackground.tsx index f199445f9..d6e839b70 100644 --- a/components/decorations/CorporateBackground.tsx +++ b/components/decorations/CorporateBackground.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useRef, useEffect } from 'react'; -import { useScroll, useTransform, useSpring, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useScroll, useTransform, useSpring, m } from 'framer-motion'; import { LogoArcs } from '@/components/ui/LogoArcs'; function MagneticRing({ diff --git a/components/decorations/EUFundingBadge.tsx b/components/decorations/EUFundingBadge.tsx index 1fe5bbf13..c5a45ea86 100644 --- a/components/decorations/EUFundingBadge.tsx +++ b/components/decorations/EUFundingBadge.tsx @@ -1,6 +1,6 @@ 'use client'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import Image from 'next/image'; export function EUFundingBadge() { diff --git a/components/forms/ContactForm.tsx b/components/forms/ContactForm.tsx index 2651083e7..01e3f99d6 100644 --- a/components/forms/ContactForm.tsx +++ b/components/forms/ContactForm.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { m, LazyMotion, domAnimation } from 'framer-motion'; +import { m } from 'framer-motion'; import { Button } from '@/components/ui/Button'; import { sendContactFormAction } from '@/app/actions/contact'; diff --git a/components/layout/MobileBottomNav.tsx b/components/layout/MobileBottomNav.tsx index d1b2706f7..d163fe0a3 100644 --- a/components/layout/MobileBottomNav.tsx +++ b/components/layout/MobileBottomNav.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; import { usePathname } from 'next/navigation'; import { TransitionLink } from '@/components/ui/TransitionLink'; import { Home, Layers, Star, Mail, Menu } from 'lucide-react'; -import { m, LazyMotion, domAnimation, AnimatePresence } from 'framer-motion'; +import { m, AnimatePresence } from 'framer-motion'; export interface NavLink { label: string; diff --git a/components/providers/InitialLoader.tsx b/components/providers/InitialLoader.tsx index a8d7517c8..6e03c32fd 100644 --- a/components/providers/InitialLoader.tsx +++ b/components/providers/InitialLoader.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useEffect, useState } from 'react'; -import { m, LazyMotion, domAnimation, AnimatePresence } from 'framer-motion'; +import { m, AnimatePresence } from 'framer-motion'; import Image from 'next/image'; diff --git a/components/providers/PageTransitionShutter.tsx b/components/providers/PageTransitionShutter.tsx index 334690888..6a2f52180 100644 --- a/components/providers/PageTransitionShutter.tsx +++ b/components/providers/PageTransitionShutter.tsx @@ -1,7 +1,7 @@ 'use client'; import React from 'react'; -import { m, LazyMotion, domAnimation, AnimatePresence } from 'framer-motion'; +import { m, AnimatePresence } from 'framer-motion'; import { useTransition } from './TransitionProvider'; import Image from 'next/image'; diff --git a/components/ui/AnimatedCounter.tsx b/components/ui/AnimatedCounter.tsx index a6211708b..d2b09ddec 100644 --- a/components/ui/AnimatedCounter.tsx +++ b/components/ui/AnimatedCounter.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useEffect, useState } from 'react'; -import { useMotionValue, useTransform, animate, useInView, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useMotionValue, useTransform, animate, useInView, m } from 'framer-motion'; interface AnimatedCounterProps { value: number; diff --git a/components/ui/decorations/StratumLines.tsx b/components/ui/decorations/StratumLines.tsx index e3c6bcf89..454b990b1 100644 --- a/components/ui/decorations/StratumLines.tsx +++ b/components/ui/decorations/StratumLines.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useInView, m, LazyMotion, domAnimation } from 'framer-motion'; +import { useInView, m } from 'framer-motion'; import { useRef } from 'react'; /** diff --git a/next.config.mjs b/next.config.mjs index 08f71a6a9..0ec74864f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,4 @@ -import withMintelConfig from '@mintel/next-config'; +import { baseNextConfig } from '@mintel/next-config'; import withBundleAnalyzer from '@next/bundle-analyzer'; import { withSentryConfig } from '@sentry/nextjs'; @@ -15,6 +15,7 @@ const nextConfig = { pagesBufferLength: 2, }, experimental: { + optimizeCss: true, staleTimes: { dynamic: 0, static: 30, @@ -547,14 +548,68 @@ const withAnalyzer = withBundleAnalyzer({ enabled: process.env.ANALYZE === 'true', }); -// withMintelConfig internally sets output:'standalone' and wraps with withSentryConfig. // In dev mode, standalone triggers @vercel/nft file tracing on every compile through // VirtioFS, which hammers CPU. Strip it for dev. const withMDX = createMDX({}); -let resolvedConfig = withMDX(withAnalyzer(withMintelConfig(nextConfig))); +let resolvedConfig = withMDX(withAnalyzer(nextConfig)); + +// Apply next-intl manually (bypassing withMintelConfig to control Sentry) +import createNextIntlPlugin from 'next-intl/plugin'; +const withNextIntl = createNextIntlPlugin(); +resolvedConfig = withNextIntl(resolvedConfig); + +resolvedConfig = withSentryConfig( + resolvedConfig, + { + silent: !process.env.CI, + treeshake: { removeDebugLogging: true }, + }, + { + disableClientWebpackPlugin: true, + autoInstrumentServerFunctions: false, + autoInstrumentMiddleware: false, + } +); + +// Manually merge baseNextConfig properties +const finalConfig = { + ...baseNextConfig, + ...resolvedConfig, + images: { + ...baseNextConfig.images, + ...(resolvedConfig.images || {}), + remotePatterns: [ + ...(baseNextConfig.images?.remotePatterns || []), + ...(resolvedConfig.images?.remotePatterns || []) + ] + }, + rewrites: async () => { + let baseRewrites = []; + if (typeof baseNextConfig.rewrites === 'function') { + baseRewrites = await baseNextConfig.rewrites(); + } + let configRewrites = { beforeFiles: [], fallback: [], afterFiles: [] }; + if (typeof resolvedConfig.rewrites === 'function') { + const res = await resolvedConfig.rewrites(); + if (Array.isArray(res)) { + configRewrites.fallback = res; + } else { + configRewrites = res; + } + } + return { + beforeFiles: configRewrites.beforeFiles || [], + fallback: [ + ...(configRewrites.fallback || []), + ...baseRewrites + ], + afterFiles: configRewrites.afterFiles || [] + }; + } +}; if (!isProd) { - delete resolvedConfig.output; + delete finalConfig.output; } -export default resolvedConfig; +export default finalConfig; diff --git a/package.json b/package.json index 12bf8c83e..db3c2eb58 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "prepare": "husky", "preinstall": "npx only-allow pnpm" }, - "version": "2.2.68", + "version": "2.2.69", "pnpm": { "onlyBuiltDependencies": [ "@parcel/watcher",