File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ module.exports = function (content) {
224224 // deliberately overriding the sourceMap option
225225 // this value is (currently) ignored by libsass when using the data input instead of file input
226226 // however, it is still necessary for correct relative paths in result.map.sources
227- sassOptions . sourceMap = this . options . output . path + '/sass.map' ;
227+ sassOptions . sourceMap = this . options . context + '/sass.map' ;
228228 sassOptions . omitSourceMapUrl = true ;
229229
230230 // If sourceMapContents option is not set, set it to true otherwise maps will be empty/null
@@ -278,7 +278,8 @@ module.exports = function (content) {
278278 result . map . file = resourcePath ;
279279 // The first source is 'stdin' according to libsass because we've used the data input
280280 // Now let's override that value with the correct relative path
281- result . map . sources [ 0 ] = path . relative ( self . options . output . path , resourcePath ) ;
281+ result . map . sources [ 0 ] = path . relative ( self . options . context , resourcePath ) ;
282+ result . map . sourceRoot = path . relative ( self . options . context , process . cwd ( ) ) ;
282283 } else {
283284 result . map = null ;
284285 }
You can’t perform that action at this time.
0 commit comments