Answer the question
In order to leave comments, you need to log in
How to update webpack style cache?
The question of such a plan, changed scss in the project and built the project using yarn build. css on the server was updated assembled, but the cache remained in the browser, is it possible to update the versions of styles on the webpack side so that all users are updated?
Answer the question
In order to leave comments, you need to log in
you can use url on css of this kind
<link rel="stylesheet" href="/frontend.css?v=2">
when you need to forcefully reset styles, just replace the number
, but it is also advised to
use hash in the file name style.baedb042c16e1bf.css. I recommend using webpack to build.
Making a hash through a question mark is not recommended, there may be problems with caching proxies and CDNs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question