VueJS/browser caching production builds

后端 未结 6 1614
抹茶落季
抹茶落季 2020-12-02 12:44

I have a VueJS app. Whenever I run npm run build it creates a new set of dist/* files, however, when I load them on the server (after deleting the

6条回答
  •  孤城傲影
    2020-12-02 13:10

    To delete the cache you can run rm -rf node_modules/.cache

    This deletes your cache. You can run a new build before deploying.

    I was having the same issue where I ran a production build, but then even when running locally my code would point to the production build instead of my latest changes.

    I believe this is a related issue: https://github.com/vuejs/vue-cli/issues/2450

提交回复
热议问题