반응형
.tsconfig.json 파일을 만들어서 루트 디렉토리 안에 넣어 추가 해주면 된다.
예시는 아래와 같다.
{
"compilerOptions": {
"target": "ES6",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
반응형
'Etc' 카테고리의 다른 글
[React] Code Convention (1) | 2024.01.08 |
---|---|
[VSCode] .eslintrc.json 설정 (0) | 2024.01.08 |
[VSCode] .prettierrc 설정 (0) | 2024.01.08 |
[Etc] 메타 태그와 오픈그래프 (0) | 2023.11.29 |
[Linux] 필수 리눅스 명령어 정리 (0) | 2023.11.27 |