Skip to content

Incremental build with changes to tsconfig's target does not regenerate js files #31118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
konpikwastaken opened this issue Apr 25, 2019 · 2 comments · Fixed by #31165
Closed
Assignees
Labels
Bug A bug in TypeScript Domain: --incremental The issue relates to incremental compilation Fixed A PR has been merged for this issue

Comments

@konpikwastaken
Copy link

TypeScript Version: 3.4.5, 3.5.0-dev.20190425

Search Terms: incremental, build, target, tsc, tsconfig

Code

bar.ts

const bar = class foo {
  private str: string;
}
export default bar;

tsconfig.json

{
... // ommitted for brevity
  "target": "esnext"
...
}

Expected behavior:
Once you build, then change the tsconfig target field to, say, commonjs, TSC should regenerate all of the output JS files.

Actual behavior:
TSC runs, but does not regenerate the JS files

It would seem that some tsconfig values should be part of the tsconfig.tsbuildinfo hash/checksum, but are not. Not sure if this is meant to be by design, but could be misleading.

@sheetalkamat sheetalkamat added Bug A bug in TypeScript Domain: --incremental The issue relates to incremental compilation labels Apr 26, 2019
@sheetalkamat sheetalkamat self-assigned this Apr 26, 2019
@indiejoseph
Copy link

Also having this problem here, whenever I removed the output directory and regenerate, I have to delete the tsconfig.tsbuildinfo, otherwise nothing happen.

@sheetalkamat
Copy link
Member

@indiejoseph Please open another issue if it repros with typescript@next .I don't see why you should have that behavior since we do handle outDir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: --incremental The issue relates to incremental compilation Fixed A PR has been merged for this issue
Projects
None yet
3 participants