From 3e96dcc3993586a970b1ce296395e9be25e04757 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 28 Aug 2020 11:27:58 +0100 Subject: [PATCH] Make the watch rate slower to avoid using a lot of CPU while developping (#23998) --- bin/packages/watch.js | 2 +- webpack.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/packages/watch.js b/bin/packages/watch.js index c74fe095f06d8d..69256b7937c5b4 100644 --- a/bin/packages/watch.js +++ b/bin/packages/watch.js @@ -44,7 +44,7 @@ getPackages().forEach( ( p ) => { fs.accessSync( srcDir, fs.F_OK ); watch( path.resolve( p, 'src' ), - { recursive: true }, + { recursive: true, delay: 500 }, ( event, filename ) => { if ( ! isSourceFile( filename ) ) { return; diff --git a/webpack.config.js b/webpack.config.js index 834792a55e6450..9ae4c4743c7dfc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -216,6 +216,7 @@ module.exports = { ].filter( Boolean ), watchOptions: { ignored: '!packages/*/!(src)/**/*', + aggregateTimeout: 500, }, devtool, };