From 396a64158537feb2e0977a28fe5bcf0a225d9666 Mon Sep 17 00:00:00 2001 From: isaaclombardssw Date: Thu, 12 Feb 2026 17:40:40 +1100 Subject: [PATCH] Clean up basePath/assetPrefix config to match TinaDocs Landing Remove unnecessary fallbacks (empty string, undefined) so basePath is undefined when not set, and use explicit ternary for image path spread. Co-Authored-By: Claude Opus 4.6 --- next.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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",