- unsetting sourceRoot when inlineSourceMap gets overriden, fix for #99

This commit is contained in:
Eugene Zolenko 2018-07-13 14:43:31 -06:00
parent f0e466c89f
commit 1986879fdb
7 changed files with 17 additions and 4 deletions

View File

@ -1 +1 @@
{"version":3,"file":"get-options-overrides.d.ts","sourceRoot":"","sources":["src/get-options-overrides.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,4CAAoC,EAAE,yBAAyB,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAoBnI"}
{"version":3,"file":"get-options-overrides.d.ts","sourceRoot":"","sources":["src/get-options-overrides.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,4CAAoC,EAAE,yBAAyB,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAyBnI"}

View File

@ -19898,6 +19898,10 @@ function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }, tsConfigJ
overrides.declarationDir = null;
if (declaration && !useTsconfigDeclarationDir)
overrides.declarationDir = process.cwd();
// unsetting sourceRoot if sourceMap is not enabled (in case original tsconfig had inlineSourceMap set that is being unset and would cause TS5051)
const sourceMap = lodash_1(tsConfigJson, "compilerOptions.sourceMap", false);
if (!sourceMap)
overrides.sourceRoot = null;
return overrides;
}

File diff suppressed because one or more lines are too long

View File

@ -19894,6 +19894,10 @@ function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }, tsConfigJ
overrides.declarationDir = null;
if (declaration && !useTsconfigDeclarationDir)
overrides.declarationDir = process.cwd();
// unsetting sourceRoot if sourceMap is not enabled (in case original tsconfig had inlineSourceMap set that is being unset and would cause TS5051)
const sourceMap = lodash_1(tsConfigJson, "compilerOptions.sourceMap", false);
if (!sourceMap)
overrides.sourceRoot = null;
return overrides;
}

File diff suppressed because one or more lines are too long

View File

@ -22,5 +22,10 @@ export function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }: IO
if (declaration && !useTsconfigDeclarationDir)
(overrides as any).declarationDir = process.cwd();
// unsetting sourceRoot if sourceMap is not enabled (in case original tsconfig had inlineSourceMap set that is being unset and would cause TS5051)
const sourceMap = _.get(tsConfigJson, "compilerOptions.sourceMap", false);
if (!sourceMap)
(overrides as any).sourceRoot = null;
return overrides;
}

View File

@ -17,7 +17,7 @@
"declaration": true,
"declarationMap": true,
"strict": true,
"outDir": "./build"
"outDir": "./build"
},
"include": [
"src/**/*.ts"