I have a tsconfig.json file containing an explicit include pattern for src/**/*. I also have tests present in test/, but these are only executed using ts-jest and I never want to compile them to my dist folder or include them when bundling the source code.
This works fine, except I started getting warnings in some test files because of required flags such as esModuleInterop. Since test/ is not included in tsconfig.json, not only are the test files ignored when building, but the flags are also not active for the test files.
How can I write a tsconfig.json file that
- Compiles only files in
src/todist/ - Still respects flags for files in
test/andtools/
I managed to put a separate tsconfig.json file in my test/ folder and yet another one in my tools/ folder but I'm wondering if it's possible to avoid this and only have a single file?