compileOptions : outDir, outFile, rootDir
{
"outFile": {
"description": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.",
"type": "string",
"markdownDescription": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.\n\nSee more: https://www.typescriptlang.org/tsconfig#outFile"
},
"outDir": {
"description": "Specify an output folder for all emitted files.",
"type": "string",
"markdownDescription": "Specify an output folder for all emitted files.\n\nSee more: https://www.typescriptlang.org/tsconfig#outDir"
},
"rootDir": {
"description": "Specify the root folder within your source files.",
"type": "string",
"markdownDescription": "Specify the root folder within your source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDir"
}
}
outDir
- 우리가 컴파일하고자 하는 루트, 어떤 영역을 대상으로 그대로 outDir에 지정된 특정 폴더에 맞춰서 생성된다.
- 자주 사용한다.
outFile
- 모듈이 시스템 혹은 AMD와 같은 형태로 지원이 되야지만 파일을 하나 더 만들어 줄 수 있다.
- 일반적으로 commonjs, ES6모듈같은 형식으로 모듈들은 하나로 합해서 파일로 만들어주는 역할은 하지 않는다.
- 다른 시스템 js나 AMD같은 것을 사용할 때 하나의 파일로 만들어준다.