Skip to content

TypeScript 3.6 transpileOnly:true incompatible with tsconfig incremental:true #995

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
shelakel opened this issue Sep 3, 2019 · 6 comments

Comments

@shelakel
Copy link

shelakel commented Sep 3, 2019

Note using both transpileOnly: true and incremental: true works with TypeScript 3.5

Expected Behaviour

Webpack build succeeds.

Actual Behaviour

Webpack fails with ... === undefined. Unexpected multiple outputs

Steps to Reproduce the Problem

Set webpack ts-loader options - transpileOnly: true and tsconfig compilerOptions - incremental: true.

Location of a Minimal Repository that Demonstrates the Issue.

https://github.com/shelakel/ts-loader-ts3_6_issue_repro

@johnnyreilly
Copy link
Member

Thanks for reporting! I'm kind of snowed and so I'm unlikely to look at this anytime soon. But if you'd like to have a go please do feel free.

My recommendation is hack away, make a start and then raise a PR. Don't worry about getting tests passing initially; just start the process and I'll help you as I can.

@shelakel
Copy link
Author

shelakel commented Sep 3, 2019

All good @johnnyreilly . I think for now adding a recommendation/caveat to the README should be sufficient. You must use either incremental: true or transpileOnly: true, but not both, when using TypeScript 3.6.

I'm sceptical of making changes to ts-loader since this issue wasn't present in TypeScript 3.5 and such changes are likely to not be compatible with TypeScript < 3.6 which could benefit performance wise from using incremental: true.

@johnnyreilly
Copy link
Member

Cool - if you'd like to raise a docs PR @shelakel I'll take a look

@plievone
Copy link

plievone commented Sep 6, 2019

Just ran into this -- will be fixed in TS 3.6.3 soon microsoft/TypeScript#33216

@johnnyreilly
Copy link
Member

Thanks @plievone!

@johnnyreilly
Copy link
Member

Closing as a TypeScript issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants