fix: set basePath for GitHub Pages deployment

Assets and routes now correctly resolve under /loldle subdirectory.
This commit is contained in:
tiennm99 committed 2026-04-04 12:23:16 +07:00
1 parent f298ddddc2
commit dc7603459f
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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}`);
+1
View File
@@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
basePath: "/loldle",
images: {
unoptimized: true,
},