gulp-concat-css will throw a quite cryptic error. The issue is in:
// https://github.com/mariocasciaro/gulp-concat-css/blob/master/index.js#L61-L62
var importData = parseImport('@import ' + rule.import + ';');
var importPath = importData && importData[0].path;
parseImport returns an empty array when it couldn't find any imports, so although importData is truthy, import[0] is undefined, and the code blows up. This seems like a good place to add a check if importData[0] exists and, if not, throw a friendlier error.
Might be related to this issue. If a CSS has an invalid import, like:
gulp-concat-css will throw a quite cryptic error. The issue is in:
parseImport returns an empty array when it couldn't find any imports, so although
importData
is truthy,import[0]
is undefined, and the code blows up. This seems like a good place to add a check ifimportData[0]
exists and, if not, throw a friendlier error.