diff --git a/src/js/babel.js b/src/js/babel.js index 6f48b5f..b49127e 100644 --- a/src/js/babel.js +++ b/src/js/babel.js @@ -80,7 +80,7 @@ export default class BabelCompiler extends SimpleCompilerBase { filename: filePath, ast: false, babelrc: false - }, compilerContext); + }); let useCoverage = false; if ('coverage' in opts) { diff --git a/src/js/typescript.js b/src/js/typescript.js index daa759c..e6c6a32 100644 --- a/src/js/typescript.js +++ b/src/js/typescript.js @@ -112,13 +112,14 @@ export default class TypeScriptCompiler extends SimpleCompilerBase { babelOpts.sourceMaps = true; } - this.babel.compilerOptions = babelOpts; + this.babelOpts = babelOpts; } - let babelOutput = this.babel.compileSync(code, filePath, { + this.babel.compilerOptions = Object.assign({}, this.babelOpts, { // babel API wants sourceMap as an object or a path. let's not touch the disk. inputSourceMap: sourceMaps ? JSON.parse(sourceMaps) : null, }); + let babelOutput = this.babel.compileSync(code, filePath, {}); // babel-transformed, potentially instrumented code code = babelOutput.code;