Nonflavored Prescription Medicine
Miss any of our Open RFC calls?Watch the recordings here! »

fork-ts-checker-webpack-plugin-limiter

1.0.0 • Public • Published

Fork Ts Checker Webpack Plugin Limiter

Limit the active forks to prevent EMFILE error when working with large number of entries.

CAVEAT

This plugin is inspired by TypeStrong/fork-ts-checker-webpack-plugin#424 and depends on alpha features at the moment of authoring, please use at your own risk.

Usage

In your webpack.config.js, add this plugin along with fork-ts-checker-webpack-plugin.

The only option is concurrency which limits the active forks allowed in the plugin, defaults to the number of CPUs in your workstation.

const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const ForkTsCheckerWebpackPluginLimiter = require("fork-ts-checker-webpack-plugin-limiter");
 
module.exports = {
  plugins: [
    new ForkTsCheckerWebpackPlugin(),
    new ForkTsCheckerWebpackPluginLimiter({ concurrency: 5 }),
  ],
  ...
  use: {
    loader: "ts-loader",
    options: {
      transpileOnly: true // for the plugin
    },
  },
  ...
};

Install

npm i fork-ts-checker-webpack-plugin-limiter

DownloadsWeekly Downloads

44

Version

1.0.0

License

WTFPL

Unpacked Size

2.67 kB

Total Files

3

Last publish

Collaborators

  • avatar