| // assetVersion.js β ONE cache-buster for every React <img> that loads a /sprites/ file. | |
| // The user swaps sprite PNGs on disk keeping the same filename; with a bare URL the browser | |
| // serves a stale cached copy (this bit us on the card faces, then the win/loss panels). | |
| // A single fresh value per page load makes every art swap show up on a plain reload. | |
| // (Pixi-loaded textures have their own equivalent buster in pixi/assets.js.) | |
| export const ASSET_VERSION = Date.now(); | |
| /** Append the per-page-load cache-buster to a URL (handles URLs that already have a query). */ | |
| export const bust = (url) => `${url}${url.includes('?') ? '&' : '?'}v=${ASSET_VERSION}`; | |