Ts-loader: Potential changes required for typescript 3.5.0

Created on 24 May 2019  路  4Comments  路  Source: TypeStrong/ts-loader

Expected Behaviour

  • Specify incremental in tsconfig.json file
  • Project is able to compile successfully with against [email protected]

Note that this issue is not present with [email protected]

Actual Behaviour

An error similar to the following one is received:

[tsl] ERROR
      TS5074: Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified

Per conversation with typescript team (microsoft/TypeScript/issues/31447), it appears that this is a change in typescript but a change in ts-loader will be required.

Current workaround is that users will also need to specify tsBuildInfo in their package.json (whereas they previously did not).

Location of a Minimal Repository that Demonstrates the Issue.

https://github.com/konpikwastaken/broken-example-ts-loader-tsc

Most helpful comment

@johnnyreilly PR submitted :)

All 4 comments

I don't believe the two are related. #935 is specific to compiling project references using the solution builder. The issue raised here has to do with usage of incremental flag set via tsconfig.

That's the issue with ts-loader where in it doesn't indicate that compiler options are from config file. if you specify tsbuildinfo file path in your config file the error should go away
(https://github.com/microsoft/TypeScript/issues/31447#issuecomment-494987555)

Gotcha. Yes - makes sense now I think about it. If you want to have a go at adding what's needed that'd be amazing. Don't worry if you need to ask questions along the way and tests don't pass - that's all totally cool and something we can collaborate on.

@johnnyreilly PR submitted :)

Was this page helpful?
0 / 5 - 0 ratings