diff --git a/src/scripts/config/main.ts b/src/scripts/config/main.ts index 46c94e116..6973aa65d 100644 --- a/src/scripts/config/main.ts +++ b/src/scripts/config/main.ts @@ -21,20 +21,17 @@ const globeState: GlobeState = { } }; +// @ts-ignore - injected via webpack's define plugin +const version = INFO_VERSION; + export default { api: { - layers: - 'https://storage.googleapis.com/esa-cfs-storage/layers/layers-{lang}.json', - layer: - 'https://storage.googleapis.com/esa-cfs-storage/layers/{id}/metadata.json', - layerTiles: - 'https://storage.googleapis.com/esa-cfs-tiles/test/{id}/{timeIndex}/{z}/{y}/{x}.png', - layerSingleImage: - 'https://storage.googleapis.com/esa-cfs-tiles/test/{id}/{timeIndex}.jpg', - stories: - 'https://storage.googleapis.com/esa-cfs-storage/stories/stories-{lang}.json', - story: - 'https://storage.googleapis.com/esa-cfs-storage/stories/{id}/{id}-{lang}.json' + layers: `https://storage.googleapis.com/esa-cfs-storage/${version}/layers/layers-{lang}.json`, + layer: `https://storage.googleapis.com/esa-cfs-storage/${version}/layers/{id}/metadata.json`, + layerTiles: `https://storage.googleapis.com/esa-cfs-tiles/${version}/{id}/{timeIndex}/{z}/{y}/{x}.png`, + layerSingleImage: `https://storage.googleapis.com/esa-cfs-tiles/${version}/{id}/{timeIndex}.jpg`, + stories: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/stories-{lang}.json`, + story: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}/{id}-{lang}.json` }, globe: globeState };