### Without `rootDir` It keeps the nesting of `src` under `dist` ```diff + dist + package.json + src/ + index.js src/ index.ts ``` ### With `rootDir: "./src"` It generates files within `./src` ```diff src/ + index.js index.ts - package.json + package.json ``` ### With `rootDir: "./src"` & `outDir: "./dist"` Fixes the `dist/src` nesting and generates the output as expected. ```diff + diff + index.js src/ index.ts - package.json + package.json ```