From 104cfc2431a14950ca3e6920c911b79d67e57a00 Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Wed, 24 Sep 2025 17:47:05 +0530 Subject: [PATCH] performence issues fixed --- app/layout.js | 17 ++++++++++++----- next.config.js | 14 +++++++++----- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/app/layout.js b/app/layout.js index fe1474a..dd016b2 100644 --- a/app/layout.js +++ b/app/layout.js @@ -1,14 +1,18 @@ +import { poppins } from "@/lib/font"; +// import dynamic from "next/dynamic"; + +// // Lazy load heavy components +// const ContactFloat = dynamic(() => import("@/components/ContactFloat"), { ssr: false }); +// const AutoPopup = dynamic(() => import("@/components/AutoPopup"), { ssr: false }); + +// Import only necessary CSS for global layout import "@/node_modules/react-modal-video/css/modal-video.css"; import "../public/assets/css/bootstrap.css"; import "../public/assets/css/color.css"; import "../public/assets/css/style.css"; import "swiper/css"; -// import "swiper/css/navigation" import "swiper/css/pagination"; import "swiper/css/free-mode"; -import { poppins } from "@/lib/font"; -import ContactFloat from "@/components/ContactFloat" -import AutoPopup from "@/components/AutoPopup"; export const metadata = { title: "Best Pain Relief & Physiotherapy - Repharehab Clinic", @@ -20,7 +24,10 @@ export default function RootLayout({ children }) { {children} - {/* */} + + {/* Lazy loaded components */} + {/* */} + {/* */} ); diff --git a/next.config.js b/next.config.js index 38da262..9191ddb 100644 --- a/next.config.js +++ b/next.config.js @@ -1,10 +1,14 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: "export", - trailingSlash: true, - images: { - unoptimized: true, - }, + output: "export", // keep: needed for next export + trailingSlash: true, + images: { + unoptimized: true, // keep: for static export + }, + swcMinify: true, // explicit SWC minify + experimental: { + forceSwcTransforms: true // use SWC only + } }; module.exports = nextConfig;