This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
node-sass doesn't return POSIX paths, correct? #2393
Comments
We don't use Mozilla sourcemaps. Our sourcemaps are generated in C++ by
LibSass.
…On Wed., 23 May 2018, 5:27 pm Nick, ***@***.***> wrote:
This is a general question, which I could not find guidelines for in
https://github.com/sass/node-sass/blob/master/.github/CONTRIBUTING.md
My understanding is that source maps only work with URLs (though I have an
issue open to confirm this
<mozilla/source-map#340>), 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
// 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 webpack-contrib/sass-loader#366 (comment)
result.map.sourceRoot = path.normalize(result.map.sourceRoot);
result.map.sources = result.map.sources.map(path.normalize);
Can you confirm whether or not this comment is accurate?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2393>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWHqEhyzpl09Buji_fTQF2k7mBStQks5t1X_HgaJpZM4UKrqj>
.
|
As far I know LibSass returns source map paths as relative filesystem paths.
…On Wed., 23 May 2018, 6:48 pm Michael Mifsud, ***@***.***> wrote:
We don't use Mozilla sourcemaps. Our sourcemaps are generated in C++ by
LibSass.
On Wed., 23 May 2018, 5:27 pm Nick, ***@***.***> wrote:
> This is a general question, which I could not find guidelines for in
> https://github.com/sass/node-sass/blob/master/.github/CONTRIBUTING.md
>
> My understanding is that source maps only work with URLs (though I have an
> issue open to confirm this
> <mozilla/source-map#340>), 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
>
> // 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 webpack-contrib/sass-loader#366 (comment)
> result.map.sourceRoot = path.normalize(result.map.sourceRoot);
> result.map.sources = result.map.sources.map(path.normalize);
>
> Can you confirm whether or not this comment is accurate?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#2393>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAjZWHqEhyzpl09Buji_fTQF2k7mBStQks5t1X_HgaJpZM4UKrqj>
> .
>
|
Got it! I'll ask in the LibSass repo then. I was under the assumption that both the Mozilla node module and LibSass were adhering to the to the same document (Source Map Revision 3 Proposal), but from what you are saying, that may not be the case. Thank you for your time and for pointing me in the right direction! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a general question, which I could not find guidelines for in https://github.com/sass/node-sass/blob/master/.github/CONTRIBUTING.md
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
Can you confirm whether or not this comment is accurate?
The text was updated successfully, but these errors were encountered: