purifycss-webpack
purifycss-webpack copied to clipboard
content hash doesn't change when content changes
purifycss-webpack: 0.7.0 purify-css: 1.2.5 node v7.5.0 npm 4.1.2
The contenthash is unreliable for cache breaking because it's calculated on the source css, so if the source html changes such that the purifier includes different content into the build, then the contenthash remains the same despite the fact that the file contents are now actually different.
Here is a repository to demonstrate the issue.
As you can see that adding additional markup to the html causes the purifier to not exclude the respective style, but the resulting contenthash for the build remains main.a4b8c75c90e070022e83e3602ea0b64b.css
If possible the contenthash from the ExtractTextPlugin should be re-calculated for the build product. At the very least this should be documented in the README, because I think as it stands the usage of the contenthash is somewhat misleading as it's generally relied upon for cache breaking.
I can't recreate it, but can confirm that while the size of files changes, [hash] isn't.
And I can't isolate if it's this module or webpack itself (feeling a bit overwhelmed with all the conventions being thrown around to give a more useful report), but think it is.