From ecf4a29b3a10095128dfa16ed01a746b319d6498 Mon Sep 17 00:00:00 2001 From: Ryan Aulia Date: Thu, 31 Aug 2023 10:01:24 +0700 Subject: [PATCH] fix: performance issue --- next.config.js | 9 +++++++-- src/app/page.tsx | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/next.config.js b/next.config.js index 658404a..bd23e43 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,9 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + reactStrictMode: true, + swcMinify: true, + images: { + domains: ["aulianza.s3.ap-southeast-1.amazonaws.com"], + }, +}; module.exports = nextConfig; diff --git a/src/app/page.tsx b/src/app/page.tsx index 278ce9a..873b4ee 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,10 +1,15 @@ +import dynamic from "next/dynamic"; + import PageWrapper from "@/common/components/PageWrapper"; -import Home from "@/modules/homepage"; + +const DynamicContent = dynamic(() => import("@/modules/homepage"), { + loading: () =>

Loading...

, +}); export default function HomePage() { return ( - + ); }