Just migrated one of our projects from webpack+babel+tsc to just webpack with esbuild-loader, the difference is astounding. Just need to remove webpack itself now so we can use their transforms.
You'll still need to keep tsc around for that, though perhaps you're doing that with another step in Webpack...?
Let's say you have a tsconfig.json. Create a tsconfig-test.json like this:
{
"compilerOptions": {
"noEmit": true,
"skipLibCheck": true
},
"extends": "./tsconfig.json",
"include": ["./\*/*.ts", "./\*/*.d.ts"]
}
Add a script to your package.json (I use "test-types") ...
"scripts": {
"test-types": "tsc --project ./tsconfig-test.json",
...
Then you can "yarn test-types" quickly. I use husky[1] to run that command as a git pre-commit hook. My team cannot commit Typescript errors. Additionally I have a strict tsconfig and a strict eslint config (with these plugins:sonarjs, @typescript-eslint, simple-import-sort) which prevents "any" types and bad typescript hygiene. Results in faster code reviews.The lack of tsc in the new process made me wonder if it just got added to Webpack
You just have your tsc compile as a pre-commit git hook and CI pipeline step.