diff --git a/ts/private/ts_project_worker.js b/ts/private/ts_project_worker.js index a14dbce1..a520d921 100644 --- a/ts/private/ts_project_worker.js +++ b/ts/private/ts_project_worker.js @@ -704,7 +704,7 @@ function createProgram(args, inputs, output, exit) { } function applySyntheticOutPaths() { - host.optionsToExtend.outDir = `${host.optionsToExtend.outDir}/${SYNTHETIC_OUTDIR}`; + host.optionsToExtend.outDir = `${host.optionsToExtend.outDir || host.optionsToExtend.rootDir || '.'}/${SYNTHETIC_OUTDIR}`; if (host.optionsToExtend.declarationDir) { host.optionsToExtend.declarationDir = `${host.optionsToExtend.declarationDir}/${SYNTHETIC_OUTDIR}` }