You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this for a site and I'm running into 2 problems. See my test project: cache-buster.tar.gz
Run run.sh to run grunt. This copies /src/ to /public/, this would be other grunt tasks for combining, preprocessing etc in a real project.
Problem 1: relative paths not correctly recognized
After running cache-bust, the CSS file is processed. background-image: url(../../assets/images/testbg.png);
is changed to background-image: url(../../assets/images/testbg.1cad98e937926582.png);
but background-image: url(../images/testbg.png);
is left untouched. Shouldn't it figure out that this relative path does match 'assets/**' because public/assets/css/../images/ == public/assets/images/?
Problem 2: busted css is lost
After running, the file public/assets/css/application.css references the busted testbg.1cad98e937926582.png. But since this CSS file is referenced in index.html, is also gets a hashed copy public/assets/css/application.2464b055e944df27.css and this file references the normal testbg.png instead of the busted file. So this doesn't work together. Is this a bug, or should use some other kind of config to get this to work?
The text was updated successfully, but these errors were encountered:
Running across this same issue. Particularly when paired with grunt-spritesmith. Worked around the relative path issue by using imgPath in spritesmith, but now the md5s are incorrect.
Problem 2 is because I provided a real filename instead of a wildcard as source. This file replaced with a hashed file so later the filename in de source config does not exist anymore and isn't processed. Will create new unit tests + fix in my pull request.
I'm trying to use this for a site and I'm running into 2 problems. See my test project: cache-buster.tar.gz
Run
run.sh
to run grunt. This copies/src/
to/public/
, this would be other grunt tasks for combining, preprocessing etc in a real project.Problem 1: relative paths not correctly recognized
After running cache-bust, the CSS file is processed.
background-image: url(../../assets/images/testbg.png);
is changed to
background-image: url(../../assets/images/testbg.1cad98e937926582.png);
but
background-image: url(../images/testbg.png);
is left untouched. Shouldn't it figure out that this relative path does match
'assets/**'
becausepublic/assets/css/../images/
==public/assets/images/
?Problem 2: busted css is lost
After running, the file
public/assets/css/application.css
references the bustedtestbg.1cad98e937926582.png
. But since this CSS file is referenced inindex.html
, is also gets a hashed copypublic/assets/css/application.2464b055e944df27.css
and this file references the normaltestbg.png
instead of the busted file. So this doesn't work together. Is this a bug, or should use some other kind of config to get this to work?The text was updated successfully, but these errors were encountered: