Post

CRA에서 build 시 .d.ts 파일 생성 안됨

CRA에서 build를 진행하는데 .d.ts 파일이 생성되지 않았다.

tsconfig.json에서 declaration, emitDeclarationOnly, outDir 설정해도 마찬가지..

tsconfig.json에 있는 baseUrl이나 include 다 잘 적용되는데..

build 할 때 tsconfig.json을 컴파일해주니 .d.ts 파일이 정상적으로 생성됐다.

1
"build": "react-app-rewired build && tsc --project tsconfig.json"

참고사이트

Creating .d.ts Files from .js files
tsc CLI Options
error TS6231: Could not resolve the path ‘’ with the extensions: ‘.ts’, ‘.tsx’, ‘.d.ts’

This post is licensed under CC BY 4.0 by the author.