diff --git a/client/modules/Preview/previewIndex.jsx b/client/modules/Preview/previewIndex.jsx index 9e16b5ad85..2c1265328d 100644 --- a/client/modules/Preview/previewIndex.jsx +++ b/client/modules/Preview/previewIndex.jsx @@ -52,6 +52,19 @@ const App = () => { } } + function addCacheBustingToAssets(files) { + const timestamp = new Date().getTime(); + return files.map((file) => { + if (file.url) { + return { + ...file, + url: `${file.url}?v=${timestamp}` + }; + } + return file; + }); + } + useEffect(() => { const unsubscribe = listen(handleMessageEvent); return function cleanup() { @@ -62,7 +75,7 @@ const App = () => {