Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Incremental builds not working

Open
#1,502 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, webpack

Research direction

Start by reproducing the issue with the referenced minimal repository, using tsconfig.json with incremental and outDir alongside webpack.config.js with output.path, then inspect how ts-loader passes TypeScript output to Webpack. Done means webpack produces the expected JavaScript files and persists .tsbuildinfo so unchanged builds can use incremental compilation.

Written by the indexing model from the issue text.

Description

Expected Behaviour

When tsconfig has the incremental compiler option set to true, a '.tsbuildinfo' file should be produced alongside the built *.js files in order to enable tsc to perform incremental builds.

Actual Behaviour

Not only is no '.tsbuildinfo' file produced, but no TypeScript build artifacts at all are produced. The outDir in tsconfig appears to be entirely ignored. The only output is the Webpack bundle, as specified by output.path.

Additionally, even if no changes have been made to any files, the compilation process still takes >15 seconds.

If I run tsc directly, the outDir (including .tsbuildinfo) is produced as expected.

Where does the output of tsc go? Clearly it's somewhere, because Webpack is able to read it to produce the bundle. But it doesn't seem to be persisted between builds.

Steps to Reproduce the Problem
  1. Set outDir to "./build/" in tsconfig.json.
  2. Set incremental to true in tsconfig.json.
  3. Set output.path to path.resolve(__dirname, "dist") in webpack.config.js.
  4. Run webpack. Observe that no .tsbuildinfo file is produced.
Location of a Minimal Repository that Demonstrates the Issue.

https://github.com/JoshuaWalsh/webpack-incremental-reprex

Dominant language
TypeScript
Stars
3.5k
Forks
439
Avg merge
1d 23h
Merged PRs (30d)
1

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TypeStrong/ts-loader

All issues in TypeStrong/ts-loader

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.