D
D
dimonfreeman2020-06-18 19:14:17
Vue.js
dimonfreeman, 2020-06-18 19:14:17

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

3 answer(s)
D
dimonfreeman, 2021-03-02
@dimonfreeman

pm2 restart 0 - this helped.

J
Just Me, 2020-06-18
@Just__Den

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');			
      }			
    }

https://forum.vuejs.org/t/disable-cache-loader-in-...

Z
ZardoZAntony, 2021-03-02
@ZardoZAntony

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 question

Ask a Question

731 491 924 answers to any question