Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion client/modules/Preview/previewIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -62,7 +75,7 @@ const App = () => {
<React.Fragment>
<GlobalStyle />
<EmbedFrame
files={state}
files={addCacheBustingToAssets(state)}
isPlaying={isPlaying}
basePath={basePath}
gridOutput={gridOutput}
Expand Down
Loading