Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit b53a368

Browse files
author
John Gozde
committed
Use filename from css.parse errors.
The file we're compiling might not be the same as the file that contains the error.
1 parent 67bb9bc commit b53a368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function () {
2626
plugins.forEach(ret.use.bind(ret));
2727
file.contents = new Buffer(ret.toString(options));
2828
} catch (err) {
29-
this.emit('error', new gutil.PluginError('gulp-rework', err, {fileName: file.path}));
29+
this.emit('error', new gutil.PluginError('gulp-rework', err, {fileName: err.filename || file.path}));
3030
}
3131

3232
this.push(file);

0 commit comments

Comments
 (0)