We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a8c35a commit 000c5e8Copy full SHA for 000c5e8
index.ts
@@ -187,6 +187,8 @@ function loader(contents) {
187
var sourceMap: any;
188
if (options.sourceMap) {
189
sourceMap = JSON.parse(output.outputFiles[0].text);
190
+ sourceMap.sources = [loaderUtils.getRemainingRequest(this)];
191
+ sourceMap.file = loaderUtils.getCurrentRequest(this);
192
sourceMap.sourcesContent = [contents];
193
contents = output.outputFiles[1].text;
194
}
typings/loaderUtils/loaderUtils.d.ts
@@ -1,3 +1,5 @@
1
declare module 'loader-utils' {
2
export function parseQuery<T>(query: string): T;
3
+ export function getRemainingRequest(loaderContext: any): any;
4
+ export function getCurrentRequest(loaderContext: any): any;
5
0 commit comments