grunt-cache-bust
grunt-cache-bust copied to clipboard
Hash values not updating
My Hashes aren't updating. I'm trying to update the hashes as the last task after i've run copy,clean etc in my dist folder. I've even tried to modify and make a change to my min.css file and then run grunt-cache-bust against it and it does not see a change and create a new hash.
cacheBust : {
revProd: {
options: {
assets: ['assets/css/sau-main.min.css'],
baseDir: 'dist',
deleteOriginals: true,
jsonOutput: false, // Output the original => new URLs to a JSON file
},
src: ['dist/partials/head.php']
}
},
I have the same Problem. The css file ('dist/css/style.min.css) is modified (to 'dist/css/style.min.10675f18bb30eb3c.css) but the src file in head.php doesn't changed.
cacheBust: {
options: {
assets: ['dist/css/style.min.css']
},
src: ['template-parts/partials/head.php']
}
Any Ideas?
Hey, not sure if you guys worked this out yet, but I ran into the same issue - for anyone that comes across this, you need to add the following option: https://github.com/hollandben/grunt-cache-bust/tree/master#optionsurlprefixes
urlPrefixes: []
Which will be combined with the default wrapping characters:
cacheBust: {
options: {
baseDir: './src/main/webapp/app/',
assets: ['*.min.js', '*.min.css'],
urlPrefixes: ['/dashboard/app/']
},
dev: {
src: ['./src/main/webapp/Dashboard.html']
},
prod: {
src: ['./src/main/webapp/Dashboard.html']
}
}
which converts
<script src="/dashboard/app/app.min.js"></script>
into
<script src="/dashboard/app/app.min.bce0b589338ff97a.js"></script>