-
Hello, I have a file called env.js that I need to replace variables on my release pipeline for Azure. I need to cache bust that file. The file is in the public folder and does not have cache busting added. (I understand that) What is the best way to handle this so I can cache bust that file? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That probably depends on how you load |
Beta Was this translation helpful? Give feedback.
That probably depends on how you load
env.js
in your app. For example, If it's hard-coded in index.html with<script src="/env.js"></script>
, then you may try usingtransformIndexHtml
plugin hook to patch it likehtml.replace("/env.js", "/env.js?version=" + Date.now())
.