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
Some checks are pending
build-docker / Build Image (push) Waiting to run
This commit is contained in:
parent
f77bcbadb7
commit
ea8c3bf602
10 changed files with 74 additions and 36 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue