Skip to content

Vite Public Folder Cache Busting #19265

Answered by hi-ogawa
ttaylor29 asked this question in Q&A
Discussion options

You must be logged in to vote

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 using transformIndexHtml plugin hook to patch it like html.replace("/env.js", "/env.js?version=" + Date.now()).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ttaylor29
Comment options

Answer selected by ttaylor29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants