Caching of JS in browsers — whether gulp-rev and how to get treated the file name?

TLDR; How to save in a variable the name of the file, which is issued by gulp-rev? Or maybe browsers don't cacheroot scripts as styles and it is generally not so necessary?

---

On one project there is a handling scripts gulp-rev and entry names in the manifest.json. There was a need to take the name of the file after being processed by the plugin (i.e. all-e03c3a6f80.min.js, for example) to another gulp task to use it.

Now I take the file name from json using regular fs.readFileSync, JSON.parse() and all that.

But because of the confusion and config do not have time to clean this up - now will not work to correct the error (because of which this manifest.json does not appear at the right time).

Thus this approach does not work as it should.

So the question arose - and whether the brother will cache the scripts as will cache the styles (which is clearly justified revisionrange permanent file name) - that is, do we want that? And if necessary, how to obtain the name of the file, which is issued by gulp-rev in the context of the execution of gulp tasks?
March 23rd 20 at 19:09
0 answer

Find more questions by tags BrowsersJavaScript