[tsconfig] 특정 파일 제외하기
Webpack 빌드할 때 특정 ts 파일 제외시키기
Webpack을 빌드하면서 jest test를 건너 뛰고 싶었다.
tsconfig.json
의 exclude
속성을 추가하면 된다.
1
2
"include": ["src"],
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
다시 빌드하면 *.test.ts
, *.test.tsx
파일은 건너뛰고 빌드한다.
How to exclude files ending in ‘.spec.ts’ in tsconfig.json
Intro to the TSConfig Reference
This post is licensed under CC BY 4.0 by the author.