I have this folder structure:
- src
- subdir1
- subdir2
This is my tsconfig.json:
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"sourceMap": true,
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"types": [
"mocha",
"node"
]
}
}
Calling ./node_modules/.bin/tsc results in this folder structure:
- dist
- src
- subdir1
- subdir2
- src
- subdir1
- subdir2
Why is src included in dist?
I ran the same thing and in fact it is a building error. In my case, i needed to get information of a file that was outside of 'src'.
Therefore, the TSC created the dir 'src' because my code "needed" to access something outside the folder 'src'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With