여기 내 tsconfig.json이 있습니다.
{
"compileOnSave": true,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "ES3",
"lib": ["ESNext"],
"strict": false,
"moduleResolution": "node",
"module": "commonjs",
"types": ["d.ts"],
"removeComments": true
},
"include": ["*.ts"]
}
내 프로젝트에는 여러 .ts 파일과 d.ts/index.d.ts
.
내 프로젝트의 .ts 파일 중 하나만 컴파일하여 .rr
확장자 가있는 파일로 출력하고 싶습니다 .
--outFile
작동하지만 모든 설정이 tsconfig.json
적용 되도록 CLI가 무엇을 말해야하는지 알 수 없습니다 . 현재 나는TS2304: Cannot find name 'blah'
outFile
아래 구성으로 작업하고 있습니다. 또는 모듈에서만 outFile
사용할 수 있습니다 . 에 대한 문제에 직면 한 구성을 시도했습니다 . 제거하면 모든 것이 예상대로 작동합니다.amd
system
lib
{
"compilerOptions": {
"target": "es5",
"module": "system",
"outFile": "./output/test.rr",
"rootDir": "./",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"include": [
"./testfile.ts"
]
}
변경, 모듈 및 lib 및 유형 제거 후 구성,
{
"compileOnSave": true,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"outFile": "./output/testfile11.rr",
"target": "ES3",
"strict": false,
"moduleResolution": "node",
"module": "system",
"removeComments": true
},
"include": [
"testfile.ts"
]
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다