-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generates incorrect source map when one of the input files has an empty source map. #8
Comments
@ohjames just for the record - gulp doesn't pass anybody sourcemaps. gulp-sourcemaps is responsible for all of that. |
I know, but many plugins also touch the source map object attached to the vinyl by gulp-sourcemaps that's why I generically use the term gulp. |
Hi @ohjames, sorry for the late answer. I just tested your example in the |
If I may breath some life into this issue, the problem reported comes from line 93 (pretty sure)(https://github.com/floridoo/concat-with-sourcemaps/blob/master/index.js#L93) this._sourceMap.addMapping({
generated: {
line: this.lineOffset + i,
column: (i === 1 ? this.columnOffset : 0)
},
original: {
line: i,
column: 0
},
source: filePath //This sucker right here
}); When a source map is not included, the mapping that is used uses the file path as the source location (as opposed to |
See gulp-community/gulp-concat#94 and gulpjs/gulp#843 (comment)
Currently gulp passes this library empty source maps which cannot be concatenated. You wanted to fix the problem here rather than in
gulp-concat
, I guess this would entail detecting empty source maps and replacing them with identity source maps.The text was updated successfully, but these errors were encountered: