Skip to content

Commit

Permalink
Make the watch rate slower to avoid using a lot of CPU while developp…
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored Aug 28, 2020
1 parent 125fc59 commit 3e96dcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/packages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ module.exports = {
].filter( Boolean ),
watchOptions: {
ignored: '!packages/*/!(src)/**/*',
aggregateTimeout: 500,
},
devtool,
};

0 comments on commit 3e96dcc

Please sign in to comment.