My aim is to get the JavaScript file: helloWorld.js to pop up in the dist-folder, while the TypeScript file: helloWorld.ts stayed in the src folder. However the JavaScript file went to the src folder. I have tried setting the tsconfig.json to have the rootDir and the outDir as:
tsconfig.json:
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"rootDir": "./src",
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
And this is the result when I run this code in the cmd terminal in VSC
...\HelloWorld>tsc helloWorld.ts
Is there something wrong with the way I have set up the config file?