From 256c5ded876665aa8531b9ad018e10b5f8da6aae Mon Sep 17 00:00:00 2001 From: behnamrhp Date: Sat, 30 Mar 2024 15:08:59 +0300 Subject: [PATCH] Fix problem with asset build --- next.config.js | 4 ++++ utilities/statics.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 778924e..090a931 100644 --- a/next.config.js +++ b/next.config.js @@ -3,6 +3,10 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, + images:{ + loader: 'akamai', + path: process.env.NEXT_PUBLIC_BASE_URL + }, webpack: (config) => { config.module.rules.push({ test: /\.glsl/, diff --git a/utilities/statics.tsx b/utilities/statics.tsx index 033aeee..764a291 100644 --- a/utilities/statics.tsx +++ b/utilities/statics.tsx @@ -44,7 +44,7 @@ export const companyDetails = { } as const -const image_prefixes = process.env.NODE_ENV === 'production' ? process.env.NEXT_PUBLIC_BASE_URL : '' +const image_prefixes = process.env.NODE_ENV !== 'production' ? process.env.NEXT_PUBLIC_BASE_URL : '' export const medias = { icons: { gitHub: image_prefixes + '/icons/GitHub.svg',