grunt-contrib-cssmin
grunt-contrib-cssmin copied to clipboard
Build fail when sourceMap is enabled and source files contains embedded sourcemap
At the end of one of my source files:
...
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI.....jc3MifQ== */
When activating sourceMap = true, I get the following error:
Running "cssmin:dev" (cssmin) task
>> Error: ENOENT, no such file or directory 'myproject/data:application/json;base64,eyJ2ZXJzaW9uI.....jc3MifQ
Warning: CSS minification failed Use --force to continue.
Aborted due to warnings.
To reproduce, just try to minify the following file with option sourceMap = true https://github.com/l-lin/font-awesome-animation/blob/master/dist/font-awesome-animation.css
I just tested and at the moment I am unable to reproduce this. What version of the task are you using?
I'm able to reproduce it with the following setup:
- grunt-contrib-cssmin v0.12.2
- grunt-cli v0.1.13
- grunt v0.4.5
- iojs v1.4.3
- windows 8.1 64bit
source file: font-awesome-animation v0.0.6 installed with bower
Grunfile.js:
...
cssmin: {
test: {
options: {
sourceMap: true
},
files: {
'output.css': ["bower_components/font-awesome-animation/dist/font-awesome-animation.css"]
}
}
},
...
Command: grunt cssmin:test
+1, i'm reproducing the same error
- grunt-contrib-cssmin 0.12.2
- grunt 0.4.5
- mac os 10.10.2
I'm experiencing a similar, ~possibly related error~.
>> Error: Invalid mapping: {"generated":{"line":1,"column":7296},"source":"../../Private/Stylesheets/bootstrap/mixins/_clearfix.scss","original":{"line":14,"column":-10},"name":null}
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- Linux 4.4.27 (Debian)
It used to work with
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- Linux 4.4.27 (Debian)
I have no idea why grunt was downgraded (no changes in package.json)
{
// ...
"grunt": "^1.0.1",
// ...
}
Please let me know if the full list of packages (npm list) can be of help.
Works with [email protected]
.
This is still an issue with a source map generated from SaSS