From dc7603459f6f76ab2c2e0486bb411fe943a03287 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sat, 4 Apr 2026 12:23:16 +0700 Subject: [PATCH] fix: set basePath for GitHub Pages deployment Assets and routes now correctly resolve under /loldle subdirectory. --- web/lib/champion-data.js | 2 +- web/next.config.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/lib/champion-data.js b/web/lib/champion-data.js index 5ed4c32..11bb9b4 100644 --- a/web/lib/champion-data.js +++ b/web/lib/champion-data.js @@ -9,7 +9,7 @@ export async function loadChampions() { if (loadPromise) return loadPromise; loadPromise = (async () => { - const response = await fetch("/champions.json"); + const response = await fetch(`/loldle/champions.json`); if (!response.ok) { loadPromise = null; throw new Error(`Failed to load champions: ${response.status}`); diff --git a/web/next.config.mjs b/web/next.config.mjs index 5ebb000..38e3208 100644 --- a/web/next.config.mjs +++ b/web/next.config.mjs @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { output: "export", + basePath: "/loldle", images: { unoptimized: true, },