-
Notifications
You must be signed in to change notification settings - Fork 381
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
Modify sourcemap paths of imported files #320
Conversation
…d of relative to file, if a different base is specified.
Possibly resolves #300 also. |
Used path.sep to reference the platform specific separator. |
What's the status of this? I came across this exact issue in our project, and after many hours I came up with a fix that looks a lot like this one. I can confirm that it will fix the issue in our project as well. I think a more elegant solution is to use sassFileSrc = file.relative;
sassMap.sources = sassMap.sources.map(function(f){
return f == sassMapFile
// Replace the stdin with the original file name
? sassFileSrc
// Get the path relative to base, not the original file path
: path.join(path.dirname(sassFileSrc), f);
}); |
The PR works. Cloud you please accept this PR and release the new version? Thanks |
lgtm, @Snugug ? |
Modify sourcemap paths of imported files
Me to. |
Great! Any chance you can push this to npm as v2.0.5? |
👍 |
Modify sourcemap paths of imported files relative to file.base instead of relative to file, if a different base is specified. Resolves #319