@@ -71,19 +71,16 @@ function build(
71
71
72
72
const { source, content } = ctx ;
73
73
74
- // If there is no sourcemap, then it is an unmodified source file.
75
- if ( ! sourceMap ) {
76
- // The contents of this unmodified source file can be overridden via the loader context,
77
- // allowing it to be explicitly null or a string. If it remains undefined, we fall back to
78
- // the importing sourcemap's `sourcesContent` field.
79
- const sourceContent =
80
- content !== undefined ? content : sourcesContent ? sourcesContent [ i ] : null ;
81
- return OriginalSource ( source , sourceContent ) ;
82
- }
74
+ // If there is a sourcemap, then we need to recurse into it to load its source files.
75
+ if ( sourceMap ) return build ( new TraceMap ( sourceMap , source ) , loader , source , depth ) ;
83
76
84
- // Else, it's a real sourcemap, and we need to recurse into it to load its
85
- // source files.
86
- return build ( new TraceMap ( sourceMap , source ) , loader , source , depth ) ;
77
+ // Else, it's an an unmodified source file.
78
+ // The contents of this unmodified source file can be overridden via the loader context,
79
+ // allowing it to be explicitly null or a string. If it remains undefined, we fall back to
80
+ // the importing sourcemap's `sourcesContent` field.
81
+ const sourceContent =
82
+ content !== undefined ? content : sourcesContent ? sourcesContent [ i ] : null ;
83
+ return OriginalSource ( source , sourceContent ) ;
87
84
} ) ;
88
85
89
86
return MapSource ( map , children ) ;
0 commit comments