Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working in loader #16

Open
SassNinja opened this issue Jun 20, 2018 · 1 comment
Open

not working in loader #16

SassNinja opened this issue Jun 20, 2018 · 1 comment

Comments

@SassNinja
Copy link

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?

@alexander-akait
Copy link
Member

@SassNinja problem still exists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants