TypeScript Version: 3.7.5
Search Terms:
tsc incremental doesn't clean old files
Code
N/A
Expected behavior:
When, for example, refactoring by renaming a file (and VS Code updates all import statements, etc), then the outputDir should not contain the old file.
Actual behavior:
The output directory contains old unused files.
Prior to trying incremental builds (today for the first time) I was simply doing rm -rf dist/ to "clean" it first. This doesn't work with incremental builds (#30602).
I tried running tsc --build --clean and tsc --build ./tsconfig.json --clean but those don't do anything, old files still remain in the output folder.
Note, I have a single tsconfig.json at the root of my project, and compile all my source code into a single output directory all at once with a single tsc command. I'm not "composing projects".
Playground Link:
N/A
Related Issues:
TypeScript Version: 3.7.5
Search Terms:
tsc incremental doesn't clean old files
Code
N/A
Expected behavior:
When, for example, refactoring by renaming a file (and VS Code updates all import statements, etc), then the outputDir should not contain the old file.
Actual behavior:
The output directory contains old unused files.
Prior to trying incremental builds (today for the first time) I was simply doing
rm -rf dist/to "clean" it first. This doesn't work with incremental builds (#30602).I tried running
tsc --build --cleanandtsc --build ./tsconfig.json --cleanbut those don't do anything, old files still remain in the output folder.Note, I have a single tsconfig.json at the root of my project, and compile all my source code into a single output directory all at once with a single
tsccommand. I'm not "composing projects".Playground Link:
N/A
Related Issues: