Add warning when not inlining source maps (#19490)

* Add warning when not inlining source maps

* more
This commit is contained in:
Charles Gagnon
2022-05-24 10:11:43 -07:00
committed by GitHub
parent 36550798f3
commit 1e3cef5d1b
2 changed files with 15 additions and 0 deletions

View File

@@ -40,6 +40,14 @@ function createCompile(src, build, emitError) {
if (!build && !process.env['SQL_NO_INLINE_SOURCEMAP']) {
overrideOptions.inlineSourceMap = true;
}
else if (!build) {
console.warn('********************************************************************************************');
console.warn('* Inlining of source maps is DISABLED, which will prevent debugging from working properly, *');
console.warn('* but is required to generate code coverage reports. *');
console.warn('* To re-enable inlining of source maps clear the SQL_NO_INLINE_SOURCEMAP environment var *');
console.warn('* and re-run the build/watch task *');
console.warn('********************************************************************************************');
}
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
function pipeline(token) {
const bom = require('gulp-bom');

View File

@@ -46,6 +46,13 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
const overrideOptions = { ...getTypeScriptCompilerOptions(src), inlineSources: Boolean(build) };
if (!build && !process.env['SQL_NO_INLINE_SOURCEMAP']) {
overrideOptions.inlineSourceMap = true;
} else if (!build) {
console.warn('********************************************************************************************');
console.warn('* Inlining of source maps is DISABLED, which will prevent debugging from working properly, *');
console.warn('* but is required to generate code coverage reports. *');
console.warn('* To re-enable inlining of source maps clear the SQL_NO_INLINE_SOURCEMAP environment var *');
console.warn('* and re-run the build/watch task *');
console.warn('********************************************************************************************');
}
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));