From a6b56a309fa5a4e9259336edb4b57238402add0f Mon Sep 17 00:00:00 2001 From: Abolfazl Jamshidi Date: Tue, 4 Jun 2024 12:11:48 +0330 Subject: [PATCH] update assets base path loading for production --- next.config.mjs | 11 +++++++++++ src/app/(home)/_components/HomeHeroSection.tsx | 5 ++++- src/constants/index.ts | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/constants/index.ts diff --git a/next.config.mjs b/next.config.mjs index a90093d..3b02240 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,18 @@ +/* eslint-disable no-undef */ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, basePath: "", + images: { + remotePatterns: [ + { + protocol: "https", + hostname: "abolfazlcodes.github.io", + port: "", + pathname: "/arman/**", + }, + ], + }, }; export default nextConfig; diff --git a/src/app/(home)/_components/HomeHeroSection.tsx b/src/app/(home)/_components/HomeHeroSection.tsx index e6321bf..bdfb931 100644 --- a/src/app/(home)/_components/HomeHeroSection.tsx +++ b/src/app/(home)/_components/HomeHeroSection.tsx @@ -1,9 +1,11 @@ +import { NEXT_BASE_PATH } from "@/constants"; import { Fira_Code } from "next/font/google"; import Image from "next/image"; const firaCode = Fira_Code({ subsets: ["latin"], weight: ["300", "400", "500", "700", "600"], + preload: true, }); const HomeHeroSection = () => { @@ -32,7 +34,8 @@ const HomeHeroSection = () => {