source-list-map
source-list-map copied to clipboard
not working in loader
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 problem still exists?