fix(react): extracting the tsconfig base should also copy existing paths (#16936)

This commit is contained in:
Colum Ferry 2023-05-11 16:08:52 +01:00 committed by GitHub
parent 2e16017fd8
commit 392312f847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ export const tsConfigBaseOptions = {
skipLibCheck: true,
skipDefaultLibCheck: true,
baseUrl: '.',
paths: {},
};
export function extractTsConfigBase(host: Tree) {
@ -22,6 +23,7 @@ export function extractTsConfigBase(host: Tree) {
const tsconfig = readJson(host, 'tsconfig.json');
const baseCompilerOptions = {} as any;
for (let compilerOption of Object.keys(tsConfigBaseOptions)) {
baseCompilerOptions[compilerOption] =
tsconfig.compilerOptions[compilerOption];