npm ts-loader 10.0.0-beta.1
v10.0.0-beta.1

one hour ago

Fixes for the TypeScript 7.1 API integration:

  • Error messages include their elaboration again (the indented "Types of parameters ... are incompatible" lines), which 10.0.0-beta.0 dropped.

  • Compiler option errors, such as an option TypeScript 7 has removed, are reported when type checking and not only with transpileOnly.

  • With transpileOnly, a compiler option error is reported once per build, not once per file as well.

  • In watch mode, a change to tsconfig.json is picked up on the next rebuild when type checking. Before, the TypeScript project kept the options it started with.

  • If the TypeScript compiler process dies, ts-loader starts a new one and adds a warning to the build. Before, every later build of a watch session failed.

  • Restore the compilerOptions and context loader options - thanks @johnnyreilly

Both were removed in 10.0.0-beta.0 and work again as they did in v9. compilerOptions overrides compiler options from tsconfig.json. context is an absolute path that relative paths in the TypeScript config are resolved against; with it set, a relative extends in the root config is also resolved against it.

More fixes for the TypeScript 7.1 API integration:

  • With declaration or composite, builds are much faster: declarations are emitted once per build, not for every project file on every file compiled. A 300-file build went from 16s to 1.2s.

  • In watch mode, a file created under the tsconfig's include that webpack doesn't bundle is now type checked. Its errors appear on the next rebuild.

  • When the compilerOptions loader option turns off an option that others in tsconfig.json depend on, those are dropped too, so the override alone doesn't cause TS5051 or TS5069. This covers sourceMap, inlineSourceMap and declarationMap (for inlineSources, sourceRoot, mapRoot) and declaration (for declarationMap, declarationDir, emitDeclarationOnly).

  • Only parse the config for new files when a project folder has changed - thanks @johnnyreilly

Looking for newly created files no longer costs a config parse on every rebuild; it cost a few milliseconds per rebuild, mostly on Windows.

Don't miss a new ts-loader release

NewReleases is sending notifications on new releases.