add sourceMap both option - closes #966
This commit is contained in:
parent
44e4dc970f
commit
eed4f312d8
@ -57,7 +57,7 @@ var compile = function (filename) {
|
||||
|
||||
if (!result) {
|
||||
result = babel.transformFileSync(filename, extend(opts, {
|
||||
sourceMap: true,
|
||||
sourceMap: "both",
|
||||
ast: false
|
||||
}));
|
||||
}
|
||||
|
||||
@ -527,8 +527,11 @@ export default class File {
|
||||
|
||||
result.map = this.mergeSourceMap(result.map);
|
||||
|
||||
if (opts.sourceMap === "inline") {
|
||||
if (opts.sourceMap === "inline" || opts.sourceMap === "both") {
|
||||
result.code += "\n" + convertSourceMap.fromObject(result.map).toComment();
|
||||
}
|
||||
|
||||
if (opts.sourceMap === "both") {
|
||||
result.map = null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user