The `fork-ts-checker-webpack-plugin` is a Webpack plugin designed to significantly improve build performance in TypeScript projects by offloading the TypeScript type checking process to a separate worker process. This allows `ts-loader` or `babel-loader` to operate in `transpileOnly` mode, focusing solely on transpilation without blocking the main Webpack compilation thread for type checks. The current stable version is 9.1.0, released on April 3, 2025. The project has a moderately active release cadence, issuing several patches and minor versions annually, with major versions arriving less frequently but introducing breaking changes like Node.js or TypeScript version bumps. Key differentiators include its support for modern TypeScript features such as project references and incremental builds, and its ability to display well-formatted error messages with code frames directly within the Webpack output. It's an essential tool for maintaining fast build times in large TypeScript-based Webpack applications.
npm install fork-ts-checker-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `fork-ts-checker-webpack-plugin` with `ts-loader` in a minimal Webpack configuration. It highlights the use of `transpileOnly: true` on `ts-loader` to offload type checking to the plugin's separate process, thereby speeding up build times.
Upgrade your Node.js environment to version 14.21.3 or higher. If unable to upgrade Node.js, downgrade the plugin to version 8.x.
For Vue.js support, downgrade to `fork-ts-checker-webpack-plugin@6` or implement a custom type checking solution for Vue SFCs.
Add `options: { transpileOnly: true }` to your `ts-loader` rule in `webpack.config.js`.Adjust the `watchOptions.ignored` pattern to specifically include only external `node_modules` or remove it if using a monorepo setup with symlinked packages.
Ensure your `fork-ts-checker-webpack-plugin` version aligns with your Webpack and TypeScript versions. For Webpack 4, use plugin version 6.x. For TypeScript 2.1-2.6.2, use plugin version 4.x. For TypeScript 2.7-3.5.3, use plugin version 6.x.
This specific error was fixed in `v9.0.1`. Upgrade `fork-ts-checker-webpack-plugin` to version 9.0.1 or newer. If the problem persists, check your TypeScript configuration for any unusual setups or corrupted files.
Upgrade `fork-ts-checker-webpack-plugin` to version 8.0.0 or newer. This version includes a fix for ignoring `node_modules` on Windows.
Upgrade `fork-ts-checker-webpack-plugin` to version 6.5.3 or newer. This version provides compatibility with TypeScript 5's performance API.
Ensure `fork-ts-checker-webpack-plugin` is correctly instantiated in your Webpack plugins array. Verify `ts-loader` has `options: { transpileOnly: true }` enabled to delegate type checking to the plugin.