You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I originally asked this question in node-sass ( sass/node-sass#2393 ), but it sounds like that wasn't the appropriate place for it.
My understanding is that source maps only work with URLs (though I have an issue open to confirm this), not file system paths, though I found the following comment in a popular node package
// node-sass returns POSIX paths, that's why we need to transform them back to native paths.// This fixes an error on windows where the source-map module cannot resolve the source maps.// @see https://github.com/webpack-contrib/sass-loader/issues/366#issuecomment-279460722result.map.sourceRoot=path.normalize(result.map.sourceRoot);result.map.sources=result.map.sources.map(path.normalize);
Question 1: Can you confirm whether or not this comment is accurate?
Question 2: Can you confirm whether or not libsass source maps aim to adhere to the Source Map Revision 3 Proposal? If not, can you point me to the documentation for the spec you are adhering to?
Thanks and regards
The text was updated successfully, but these errors were encountered:
If the sources are not absolute URLs after prepending of the “sourceRoot”, the sources are resolved relative to the SourceMap (like resolving script src in a html document).
This is what libsass does, so we do adhere to the v3 draft. Since they are relative they are also valid relative "posix" paths. Hth
So if I were to explain it to someone else, then I'd be telling them that relative URLs only appear to be POSIX paths because:
They both use . to represent the current directory
They both use .. to represent the parent directory
They both use / to represent a segment/directory separator
In the case of relative paths, there are not URI protocols, domains, or ports, so it otherwise is a valid POSIX filesystem path (assuming the relative path does not have a hash or a query string.)
Would it be too confusing to bring up symbolic links here?
This is a general question, which didn't seem to have specific guidelines in https://github.com/sass/libsass/blob/master/.github/CONTRIBUTING.md, I'll do my best to be thorough.
I originally asked this question in node-sass ( sass/node-sass#2393 ), but it sounds like that wasn't the appropriate place for it.
My understanding is that source maps only work with URLs (though I have an issue open to confirm this), not file system paths, though I found the following comment in a popular node package
https://github.com/webpack-contrib/sass-loader/blob/2529c0716b1bca321c22d16636b1385682b1c730/lib/loader.js#L90-L94
Thanks and regards
The text was updated successfully, but these errors were encountered: