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

bug(gulp-traceur@0.14.0): double sourceMaps at the end of the file #47

Closed
douglasduteil opened this issue Nov 12, 2014 · 0 comments · Fixed by #48
Closed

bug(gulp-traceur@0.14.0): double sourceMaps at the end of the file #47

douglasduteil opened this issue Nov 12, 2014 · 0 comments · Fixed by #48

Comments

@douglasduteil
Copy link
Contributor

Back in the version 0.13.0 there was only one sourceMappingURL at the end of the files.

Contents of the test should generate source maps with the gulp-traceur@0.13.0

"use strict";
[].map((function(v) {
  return v + 1;
}));

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpeHR1cmUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQSxDQUFDLElBQUksQUFBQyxFQUFDLFNBQUEsQ0FBQTtPQUFLLENBQUEsQ0FBQSxFQUFJLEVBQUE7QUFBQSxFQUFDLENBQUE7QUFBQSIsImZpbGUiOiJmaXh0dXJlLmpzIiwic291cmNlc0NvbnRlbnQiOlsiW10ubWFwKHYgPT4gdiArIDEpIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9

Is it normal to have two of them in the new version 0.14.0 ?

Contents of the same test should generate source maps with the gulp-traceur@0.14.0

"use strict";
[].map((function(v) {
  return v + 1;
}));

//# sourceMappingURL=fixture.map

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpeHR1cmUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQSxDQUFDLElBQUksQUFBQyxFQUFDLFNBQUEsQ0FBQTtPQUFLLENBQUEsQ0FBQSxFQUFJLEVBQUE7QUFBQSxFQUFDLENBQUE7QUFBQSIsImZpbGUiOiJmaXh0dXJlLmpzIiwic291cmNlUm9vdCI6Ii9ob21lL3gvdG1wL2d1bHAtdHJhY2V1ci9maXh0dXJlIiwic291cmNlc0NvbnRlbnQiOlsiW10ubWFwKHYgPT4gdiArIDEpIl19

I'm not sure about the use case of this;

// [...]
if (file.sourceMap) {
    fileOptions.sourceMaps = true;
}
// [...]

(extract from https://github.com/sindresorhus/gulp-traceur/blob/v0.14.0/index.js#L25 )

Setting the sourceMaps options to true is actually making traceur process the sourceMaps itself no ? (see https://github.com/google/traceur-compiler/wiki/SourceMaps)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant