We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7e504d commit ad45d89Copy full SHA for ad45d89
lib/index.js
@@ -36,10 +36,14 @@ function typescriptLoader(text) {
36
this._compiler.typeScriptWebpackHost.emit(resolver, filename, text)
37
.then(function(output) {
38
var result = findResultFor(output, filename);
39
+ var sourceFilename = loaderUtils.getRemainingRequest(this);
40
+ var current = loaderUtils.getCurrentRequest(this);
41
if (result.text === undefined) {
42
throw new Error('no output found for ' + filename);
43
}
44
var sourceMap = JSON.parse(result.sourceMap);
45
+ sourceMap.sources = [sourceFilename];
46
+ sourceMap.file = current;
47
sourceMap.sourcesContent = [text];
48
cb(null, result.text, sourceMap);
49
}.bind(this))
0 commit comments