Currently, I am working on a TypeScript project using an ASP.NET 5 template in VS.NET 2015. In the scripts/tsconfig.json
file that I added, there is a default exclude
section which includes:
"exclude": [
"node_modules",
"wwwroot"
]
However, as I followed tutorials, I realized that I should set the TypeScript build output directory to:
"outDir": "../wwwroot"
The official definition of exclude
from the TypeScript wiki explains it as follows:
If the "exclude" property is specified, the compiler includes all TypeScript (*.ts or *.tsx) files in the containing directory and subdirectories except for those files or folders that are excluded.
I am a bit confused because the tsconfig.json
file applies settings to the virtual typescript project within the folder where it is located (in my case, the /scripts
folder). Do I still need that exclude setting? Why was wwwroot
automatically added to be excluded? Since I don't intend to have a wwwroot
folder within my /scripts
folder, I am trying to understand the reasoning behind excluding it. Was it added by default assuming I could have placed my tsconfig.json
file at the root of the project, in which case excluding the wwwroot
folder would make sense?