Creating the configuration files
To create the configuration for the TypeScript compiler, add a file named tsconfig.json
to the part2app
folder with the content shown in Listing 9.5.
Your code editor may report errors with the tsconfig.json
file, but these will be resolved when you start the development tools in Listing 9.12.
Listing 9.5: The contents of the tsconfig.json file in the part2app folder
{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"rootDir": "src/server",
"outDir": "dist/server/"
},
"include": ["src/server/**/*"]
}
This file builds on the configuration contained in the @tsconfig/node20
package added to the project in Listing 9.4. The rootDir
and include
settings are used to tell the compiler to process files in the src/server
folder. The outDir
setting tells the compiler...