Closed yellowled closed 10 years ago
Did you run hashres twice without re-generating dist/*.html
files?
Last grunt-hashres release tries to be smart by identifying previously hashed references, and in your case, since your using {hash}.{ext}
as a pattern, a second run wouldn't be able to determine that both references are different.
Please run hashres using a clean version of dist/*.html
.
My deploy task includes contrib-clean which cleans out the entire dist/
directory before even running hashres. So yes, I did. :)
Also, further testing shows it doesn't seem to be related to the Grunt version. Have tested it with 0.4.2, 0.4.3 and 0.4.4. However, it does work in some test cases and doesn't work in others. Very weird. Any other ideas what to test/try? Change the hash pattern?
Try to change the pattern and let me know if it works.
Cheers
It does in fact work if I use the default pattern ${hash}.${name}.cache.${ext}
as well as with (apparently) any pattern including ${name}
.
It does, by the way, not re-create the references if I run grunt hashres
multiple times (using default in the first run, ${name}-${hash}.${ext}
in the second) without cleaning dist
first. But that's entirely acceptable, at least for me.
Thanks.
Using node.js 0.10.26, Grunt 0.4.4 and grunt-hashres 0.4.1 on OS X 10.9.2.
I include two stylesheets in HTML files to have a oldIE fallback in mobile first projects. This means that my hashres task has to rename/map two CSS files, which used to work fine.
Today I noticed that this is no longer the case – both CSS files are renamed properly, but both references in the HTML file are changed to the hash of the first stylesheet, i.e. for
the output is
which – of course – doesn't work.
Happy to provide further debug info/output, just give me very specific instructions what you need, please.