source-list-map icon indicating copy to clipboard operation
source-list-map copied to clipboard

not working in loader

Open SassNinja opened this issue 7 years ago • 1 comments

I'm working on a custom loader. In it I'm emitting files and would like to have sourceMap for each. Thus I've included this package.

According to the loader API docs it has to be done like this emitFile(name: string, content: Buffer|string, sourceMap: {...})

My example looks like this:

const map = new SourceListMap();
map.add("Generated\ncode1\n", "source-code.js", "Orginal\nsource");
map.add("Generated\ncode2\n");
map.toStringWithSourceMap({ file: "generated-code.js" });
this.emitFile('generated-code.js', 'Generated\ncode1\n', map);

But no matter what I try, no sourceMap appears in the emitted files but only the content. I would like the map to cause something like /*# sourceMappingURL=data:application/json;charset=utf-8;base64,...*/ in the file.

@sokra @TheLarkInn have I misunderstood the purpose of this package or is it a bug?

SassNinja avatar Jun 20 '18 07:06 SassNinja

@SassNinja problem still exists?

alexander-akait avatar Sep 10 '20 12:09 alexander-akait