Grunt-wp-version not changing version

Problem - my cache isn’t refreshing.

I checked the version of the main.min.css generated by grunt.

After making updates I would run grunt and see this result in my terminal:

Running "version" task Versioning assets/css/main.min.css...OK Versioning assets/js/scripts.min.js...OK "lib/scripts.php" updated with new CSS/JS versions.

grunt-wp-version looks like it is working.

The only problem is the version number it gives the css file never changes.

What’s strange is that even if I rewrite the version number manually in scripts.php, upon running grunt the version number gets overwritten back to the old version number again.

Here’s an example of what the resulting css file with version number looks like:

main.min.css?ver=b3279a020cff9367a5c959667af7accd

Have you run across this? If so did you manage to fix it?

I assume you’re making actual changes to your SASS file? The version is just the checksum of the file, so if you are adding a space to test - which subsequently gets deleted with the minification - then the version number will not change.

Doh!

You’re right :smile:

Thanks for your insight. You’re right.

Quick question…

This is probably my fault, but my Chrome browser cache is not bursting after the css version changes.

Do you have any idea why?