fork-ts-checker-webpack-plugin

Runs TypeScript type checking in a separate forked process so webpack builds stay fast.

Tool
npm
v9.1.0
2,000 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
56 /100 Fair
Development Activity 4
Maintenance 44
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 80
Code Quality 78
Innovation 68
Learning Curve 70

fork-ts-checker-webpack-plugin offloads TypeScript type checking to a forked child process, decoupling slow full-program type analysis from webpack’s own compilation pipeline. Instead of blocking every rebuild on tsc-level checks, the plugin hands type checking to a background worker communicating over a lightweight RPC layer built on Node’s IPC channel, and reports diagnostics back to webpack asynchronously once they’re ready.

It is designed to sit alongside a transpile-only loader (typically ts-loader with transpileOnly: true or babel-loader), so webpack emits JavaScript immediately while the checker validates types on its own schedule. This split is what lets teams keep using strict TypeScript project references, incremental builds, and .tsbuildinfo caching without paying their cost on every save during development.

What You Get

  • A ForkTsCheckerWebpackPlugin class that taps into webpack’s compiler hooks (afterEnvironment, run/watchRun, done) to start, feed, and stop a background type-checking worker
  • Support for TypeScript project references and incremental/--build mode, including write-dts, write-tsbuildinfo, and write-references output modes
  • Configurable issue filtering (include/exclude) that matches on severity, error code, or file glob before issues ever reach webpack’s error/warning output
  • Pluggable diagnostic formatters (basic, codeframe, or a custom function) for how type errors are rendered in the terminal
  • async mode that reports issues after compilation finishes instead of blocking the watch/rebuild cycle, plus webpack-dev-server integration for overlay/logging
  • Cosmiconfig-based configuration, so options can live in package.json, .fork-ts-checkerrc, or fork-ts-checker.config.js instead of only the plugin constructor

Common Use Cases

  • Pairing with ts-loader in transpileOnly mode so webpack emits JS immediately while this plugin catches type errors in parallel
  • Keeping large monorepos with TypeScript project references fast to rebuild by running --build-equivalent checking off the main thread
  • Surfacing type errors in the webpack-dev-server overlay during local development without adding type-check latency to hot reloads
  • Enforcing selective type-error policies in CI/dev by including or excluding specific files, error codes, or severities from failing a build

Under The Hood

Architecture The plugin’s apply(compiler) method in src/plugin.ts wires a small set of single-purpose hook modules (src/hooks/tap-after-environment-to-patch-watching.ts, tap-start-to-run-workers.ts, tap-after-compile-to-add-dependencies.ts, tap-stop-to-terminate-workers.ts, tap-error-to-log-message.ts) into webpack’s compiler lifecycle, keeping each concern (patching watch mode, spawning workers, reporting dependencies, cleanup, error logging) in its own file rather than one monolithic apply. Type checking itself never runs in-process: src/rpc/rpc-worker.ts forks a child process per worker (get-issues-worker.ts, get-dependencies-worker.ts under src/typescript/worker), passing config through an env var and a custom wrapRpc/exposeRpc protocol built on Node’s IPC channel with advanced serialization, so a plugin instance can restart or terminate a checker process independently of webpack’s own compilation.

Tech Stack Written in TypeScript targeting webpack 5 and TypeScript >3.6 as peer dependencies, with cosmiconfig for layered configuration discovery (constructor options merged via deepmerge over package.json/.fork-ts-checkerrc/fork-ts-checker.config.js), schema-utils validating options against a JSON Schema (plugin-options.json), chokidar for filesystem watching, minimatch for glob-based issue include/exclude filters, and semver for version comparisons; the package is built with tsc directly (no bundler), tested with jest/ts-jest, and released via semantic-release from a Yarn Berry (v4) workspace.

Code Quality The repo runs both a unit suite (test/unit, covering RPC wrapping, issue matching, formatters, path utilities) and a full end-to-end suite (test/e2e, driving real webpack builds against fixture projects via npm pack), with eslint (typescript-eslint + prettier) enforced through husky/lint-staged pre-commit hooks and commitlint gating conventional-commit messages. Public types (RpcMethod, IssueFilter, ForkTsCheckerWebpackPluginOptions) are explicit and exported, and CI runs the full build+test+lint pipeline on every push.

API Design The public surface is a single default-exported class matching webpack’s own plugin convention (new ForkTsCheckerWebpackPlugin(options) + .apply(compiler)), so integration requires no new mental model beyond “add it to the plugins array.” Configuration is grouped into a small number of nested option objects (typescript, issue, formatter, logger, devServer) with sensible defaults, and the cosmiconfig support means teams can keep plugin config out of webpack.config.js entirely if they prefer a dedicated config file.

Used by 9 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
Go
65%
AGPL 3.0

Fider

Customer Support · Product Management

4,545

Open-source feedback portal where customers submit, vote on, and track feature requests so product teams build what actually matters.

View details
89
Repo Health
85
Technical
71
Dependency
Built with
Go 65%
TypeScript 28%
Updated 6 days ago
TypeScript
92%
MIT

GB Studio

Design Tools · Developer Tools · Game Development

9,407

Drag-and-drop retro Game Boy game creator that compiles real ROMs — no coding required.

View details
88
Repo Health
83
Technical
73
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
TypeScript
48%
AGPL 3.0

Grafana

Analytics · Monitoring

76,962

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript 48%
Go 46%
Updated 5 days ago
Go
62%
Apache 2.0

Harness Open Source

Code Editors · Developer Tools · Devops

38,450

A unified open source DevOps platform combining Git hosting, CI/CD pipelines, cloud development environments, and artifact registries in a single self-hosted system.

View details
89
Repo Health
79
Technical
64
Dependency
Built with
Go 62%
TypeScript 33%
Updated 1 weeks ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,378

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
67
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 1 months ago
TypeScript
61%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,797

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 61%
Svelte 34%
Updated 1 weeks ago
TypeScript
88%
Other

strapi

CMS

73,243

Open-source headless CMS that auto-generates REST and GraphQL APIs from your content models, with a fully customizable admin panel you control.

View details
93
Repo Health
84
Technical
66
Dependency
Built with
TypeScript 88%
JavaScript 12%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers