Inline source maps in dev build (#18970)

* Inline source maps in dev build

* Update readme

* correct command

* Use env var

* Update location
This commit is contained in:
Charles Gagnon
2022-04-07 16:39:08 -07:00
committed by GitHub
parent 683d906138
commit a595fb8fd1
4 changed files with 15 additions and 11 deletions

View File

@@ -37,10 +37,9 @@ function createCompile(src, build, emitError) {
const sourcemaps = require('gulp-sourcemaps');
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
const overrideOptions = Object.assign(Object.assign({}, getTypeScriptCompilerOptions(src)), { inlineSources: Boolean(build) });
// {{SQL CARBON EDIT}} Never inline source maps so that generating local coverage works
// if (!build) {
// // overrideOptions.inlineSourceMap = true;
// }
if (!build && !process.env['SQL_NO_INLINE_SOURCEMAP']) {
overrideOptions.inlineSourceMap = true;
}
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
function pipeline(token) {
const bom = require('gulp-bom');