Answer the question
In order to leave comments, you need to log in
How to clear vue cache?
There is a site on vue + yii2 , after build a request to old js files, time passes and everything is ok.
Where to cache and how to clear it...
Answer the question
In order to leave comments, you need to log in
if it's only in vue then like this:
vue.config.js
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.module.rule('vue').uses.delete('cache-loader');
config.module.rule('js').uses.delete('cache-loader');
config.module.rule('ts').uses.delete('cache-loader');
config.module.rule('tsx').uses.delete('cache-loader');
}
}
Generate js file names with a unique parameter.
For example add time() /asset/js/main.js?1614661999
This is the most commonly used approach
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question