From 6a663b83e14edf8c16f7b0878b7f642ae5f290f1 Mon Sep 17 00:00:00 2001 From: Dmitriy Sadkovoy Date: Tue, 5 Jun 2018 14:22:22 +0300 Subject: [PATCH] Configured the thread-loader to keeping workers alive in development mode --- packages/react-scripts/config/webpack.config.dev.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index d2b9d739ed0..9280cff3217 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -258,7 +258,12 @@ module.exports = { use: [ // This loader parallelizes code compilation, it is optional but // improves compile time on larger projects - require.resolve('thread-loader'), + { + loader: require.resolve('thread-loader'), + options: { + poolTimeout: Infinity // keep workers alive for more effective watch mode + }, + }, { loader: require.resolve('babel-loader'), options: {