-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix incorrect source maps in certain cwds #377
Conversation
All source map paths will be relative to process.cwd() from now on. This removes also the last dependency on this.options.context. node-sass source map options like sourceMapRoot, omitSourceMapUrl, sourceMapContents are now overridable. #374 (comment)
@bholloway I've written a test that checks if all files in the source map can be resolved. |
@jhnns I wish there was some standard for this because every loader does it differently. Some are really broken on windows too. I think this will work. When content is not embedded then it will need to be served to the browser. So we should avoid I learned of some users that have sources outside Interestingly (in Webpack 1 at least) all of this is unlikely to influence the final source-map. That is done by |
@jhnns I believe this fixes the source-map sources inconsistency from the original comment. I have tested the hacked version of your Webpack 2 project that includes some I say MERGE! The bad news (not your problem): I believe that
When I made the #374 comment I believed that it did not effect However it seems like it is a problem for Hopefully there is some error in my Webpack 1 test methodology and Have you encountered this? I think this is not your problem, or at least, a different issue. |
Thx for reviewing it.
That is a known problem. I don't know enough about source maps, whether that is valid. But it seems like the source maps from node-sass itself are interpreted correctly (tested on chrome). I assume that webpack's
Chrome allows to configure a directory mapping for source maps. Thus, source maps don't need to be served. The problem here is that we don't know anything about the final source map destination inside the loader. That's why I think it's better to use relative paths with a |
All source map paths will be relative to process.cwd() from now on.
This removes also the last dependency on this.options.context.
node-sass source map options like sourceMapRoot, omitSourceMapUrl, sourceMapContents are now overridable.
#374 (comment)