Skip to content
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

Use the same sourceFile Name when applySourceMap #8

Closed
wants to merge 2 commits into from
Closed

Use the same sourceFile Name when applySourceMap #8

wants to merge 2 commits into from

Conversation

clempat
Copy link

@clempat clempat commented May 1, 2015

@clempat
Copy link
Author

clempat commented May 1, 2015

I still have other issue...

@clempat clempat closed this May 1, 2015
@clempat clempat reopened this May 1, 2015
@mariusGundersen
Copy link

As mentioned in the original comment this seems to fix the gulp-sass|gulp-autoprefixer|gulp-sourcemaps issue. Why has this not been merged? Does it create other issues?

@clempat
Copy link
Author

clempat commented Aug 18, 2015

Not as far as I know...

@mariusGundersen
Copy link

What did you refer to when you said you had an other issue @clempat? Did this create some issue or did it not fix your issue after all?

@clempat
Copy link
Author

clempat commented Aug 18, 2015

Ah Yes true, shame I don't remember why I said I still had an issue. What I can say now is I was using it on project using gulp and did not get anymore issues as far I remember. And for sure was fixing the issues I mentioned.

@floridoo
Copy link
Member

Sorry for the late answer. This was not merged because this change seems wrong to me: The second parameter to SourceMapGenerator.prototype.applySourceMap is the source file in the generator that the source map in the first parameter should be applied to. In this case that should be file.sourceMap.file (= the output file of file.sourceMap), not sourceMap.file (which is the output file of the source map in the generator).

Can you explain to me why it should be sourceMap.file?

@clempat
Copy link
Author

clempat commented Sep 27, 2015

I would have to check again as it was some time ago. As well that I start now to use npm script. Yeah got into the way grunt->gulp->npm script :)... I could just refer to my comment:

From my side while debugging I saw that the sourcemap was overwritten because of the source file name different (for my case, first app.scss and then app.css)

https://github.com/mozilla/source-map/blob/0.4.4/lib/source-map/source-map-generator.js#L194

@floridoo
Copy link
Member

Thanks @clempat!
Sounds like the file or sources entry of the passed source maps were incorrect and this change fixed it for that case. But it could break other uses, so I won't merge this.

@floridoo floridoo closed this Sep 27, 2015
@mariusGundersen
Copy link

BTW, this is the cause of this issue too: terinjokes/gulp-uglify#105

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

Successfully merging this pull request may close these issues.

None yet

3 participants