Open aeomer opened 8 years ago
I think smysnk is on vacation. ;-)
I am now doing this by post processing the manifests. However, it is a clear use case which matches with the original reason this plugin was created.
Would anyone like to suggest how they would like to see this implemented rather than me blindly adding the functionality and making a pull request?
I have a use case related to performance which I believe is quite common.
Consider having a number of image or font assets which are referenced from and only from a CSS file. gulp-rev-all will properly transform the names of those assets to include a hash and ensure the references in the CSS file are updated. All good so far. However, it will also create an entry in the manifest for each one of what could be hundreds of asset files, none of which are referenced from anywhere other than the CSS file. This leads to a huge manifest from which only a few references are ever used in code. (This is the simple case; there is a slightly more complex one below.) The existing options do not seem to cover excluding files from the manifest, only from the entire file stream. To complete the use case, a number of the image files and other files referenced in the CSS may be referenced in the code, too - just a few, not all of them. This means a naive fix, such as flag excluding external resources to a CSS file from the manifest, is not desirable.
Does anyone have a demonstrable solution to this issue? I was unable to make gulp-ignore do this.
If not, could we add an option to manifest generation which exclude renamed files from the manifest which match an array of glob patterns matching the source name?