Hello everyone!
I'm working on a TypeScript project with a well-defined folder structure, and I'm trying to transpile my code so that it ends up in the "dist" folder.
- src/
- index.ts
- folder1/
- file1.ts
- file2.ts
- folder2/
- file3.ts
- dist/
Unfortunately, After running the tsc command, I would expect the resulting JavaScript files to be placed in the "dist" folder, while preserving the same folder structure as the TypeScript source code.
my tsc.config:
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"target": "ESNext",
"module": "CommonJS",
// Other compilation options...
},
// Other settings...
}
Instead, I'm getting a rather confusing output, and all the JavaScript files seem to be placed together in the same "dist" folder, disregarding the original folder structure.
how can i obtain the same folder structure ?
thx in advance