Enable inline source maps
This commit is contained in:
parent
60d77e7b92
commit
301657a207
|
|
@ -12,7 +12,7 @@ namespace ES2015Example.Controllers
|
|||
{
|
||||
// TODO: Don't hard-code wwwroot; use proper path conversions
|
||||
var fileContents = System.IO.File.ReadAllText("wwwroot/" + filename);
|
||||
var transpiledResult = await nodeInstance.Invoke("transpilation.js", fileContents);
|
||||
var transpiledResult = await nodeInstance.Invoke("transpilation.js", fileContents, Request.Path.Value);
|
||||
return Content(transpiledResult, "application/javascript");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
var babelCore = require('babel-core');
|
||||
|
||||
module.exports = function(cb, fileContents) {
|
||||
var result = babelCore.transform(fileContents, {});
|
||||
module.exports = function(cb, fileContents, url) {
|
||||
var result = babelCore.transform(fileContents, {
|
||||
sourceMaps: 'inline',
|
||||
sourceFileName: '/sourcemapped/' + url
|
||||
});
|
||||
cb(null, result.code);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue