Ignoring local source map
oninross opened this issue · 7 comments
It was working before I cloned my project to another computer and did an npm install. I am receiving a lot of error messages like the one below
>> Ignoring local source map at "CSS_MAP_FILE" as resource is missing.
Currently, im running grunt-contrib-cssmin@2.0.0. A colleague of mine is using grunt-contrib-cssmin@1.0.2 and its not receiving any errors.
This is troublesome for developers who need minified CSS files
Had a similar issue, for me it was caused by a breaking change introduced in css-clean v4. css-clean v4 looks like it was added to cssmin after 1.0.2 so might be whats causing your issue.
If you were using the root
, target
or relativeTo
options you'll need to change them to use the single rebaseTo
. See here for details
https://github.com/jakubpawlowicz/clean-css#important-40-breaking-changes
See the reply above.
@hi @XhmikosR the comment made by @josh-bradley doesn't seem like it leads to a resolution for this issue in all cases.
I'm not using root
, target
or relativeTo
options in my grunt-contrib-cssmin
config and I'm still getting the same error:
Ignoring local source map at "/Users/dave/Downloads/kapow-test/style.css.map" as resource is missing.
I'm on version 2.2.0
.
A sourcemap file called style.css.map
resides in the same directory as the CSS file being minified, so it's not immediately obvious what the issue is.
Cheers!
hey @davetgreen and @cvillanujr have you tried adding the rebaseTo
option anyway, give it a value pointing to where your output files are going. If that does not work are you able to share your config?
@josh-bradley I did and it did modify the map url but it also changes background image references which lead to broken images.
hey @josh-bradley, I found that adding rebaseTo did actually resolve the issue, sorry I totally forgot to come back and report that! 👌