1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00
tobspr_shapez.io/src/js/core/cachebust.js
2020-05-09 16:45:23 +02:00

11 lines
291 B
JavaScript

/**
* Generates a cachebuster string. This only modifies the path in the browser version
* @param {string} path
*/
export function cachebust(path) {
if (G_IS_BROWSER && !G_IS_STANDALONE && !G_IS_DEV) {
return "/v/" + G_BUILD_COMMIT_HASH + "/" + path;
}
return path;
}