diff --git a/next.config.js b/next.config.js index cf6aaf00..12b97418 100644 --- a/next.config.js +++ b/next.config.js @@ -4,9 +4,8 @@ const redirects = require("./content/settings/config.json")?.redirects || []; /** @type {import('next').NextConfig} */ const isStatic = process.env.EXPORT_MODE === "static"; -const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; -const assetPrefix = - process.env.NEXT_PUBLIC_ASSET_PREFIX || basePath || undefined; +const basePath = process.env.NEXT_PUBLIC_BASE_PATH; +const assetPrefix = process.env.NEXT_PUBLIC_ASSET_PREFIX || basePath; const extraConfig = {}; @@ -21,7 +20,7 @@ module.exports = { basePath, assetPrefix, images: { - ...(assetPrefix && { path: `${assetPrefix}/_next/image` }), + ...(assetPrefix ? { path: `${assetPrefix}/_next/image` } : {}), remotePatterns: [ { protocol: "https",