We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 184448c + 340600a commit 5cd2e53Copy full SHA for 5cd2e53
client/modules/Preview/previewIndex.jsx
@@ -52,6 +52,19 @@ const App = () => {
52
}
53
54
55
+ function addCacheBustingToAssets(files) {
56
+ const timestamp = new Date().getTime();
57
+ return files.map((file) => {
58
+ if (file.url) {
59
+ return {
60
+ ...file,
61
+ url: `${file.url}?v=${timestamp}`
62
+ };
63
+ }
64
+ return file;
65
+ });
66
67
+
68
useEffect(() => {
69
const unsubscribe = listen(handleMessageEvent);
70
return function cleanup() {
@@ -62,7 +75,7 @@ const App = () => {
75
<React.Fragment>
76
<GlobalStyle />
77
<EmbedFrame
- files={state}
78
+ files={addCacheBustingToAssets(state)}
79
isPlaying={isPlaying}
80
basePath={basePath}
81
gridOutput={gridOutput}
0 commit comments