R
R
Rooly2022-02-27 11:14:00
JavaScript
Rooly, 2022-02-27 11:14:00

How to set up automatic versioning when building npm (yarn)?

I want to solve a long-standing problem in my project of caching javascript by the browser when building with yarn a project written in vue.

I want that during yarn build, a random salt is added to the files and an alert is displayed to the user who sits on the site.

How to add random salt via assembly? I can not find.
As for versioning, I haven’t yet come up with a better way how to store versions on the client and on the server that would be checked, that is, each assembly assumes an increase in the version on the server and when you click on the update consent, the version on the client would increase.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question