Makes the webpack build use relative paths to allow for deploying on web subdirectories
Some checks are pending
build-docker / Build Image (push) Waiting to run

This commit is contained in:
mrkmntal 2026-04-08 21:31:56 -04:00
commit ea8c3bf602
10 changed files with 74 additions and 36 deletions

View file

@ -1,5 +1,7 @@
// Data loader utility for fetching JSON data with cache-busting
import { withBasePath } from './base-path.mjs';
let dataCache = {};
// Load data with version-based cache busting
@ -9,7 +11,7 @@ const loadData = async (dataType, version = '') => {
}
try {
const url = `/data/${dataType}.json${version ? `?_=${version}` : ''}`;
const url = withBasePath(`data/${dataType}.json${version ? `?_=${version}` : ''}`);
const response = await fetch(url);
if (!response.ok) {