From 25907f5c72d7bd13acc73f5c399a5a06e8753743 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 16 Jul 2021 09:30:43 -0400 Subject: [PATCH] chore: Reduce idle CPU usage in development --- package.json | 4 ++-- server/app.js | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6dbbbac4c..76bceadb7 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build:webpack": "webpack --config webpack.config.prod.js", "build": "yarn clean && yarn build:webpack && yarn build:i18n && yarn build:server", "start": "node ./build/server/index.js", - "dev": "nodemon --exec \"yarn build:server && yarn build:i18n && node --inspect=0.0.0.0 build/server/index.js\" -e js --ignore build/ --ignore app/", + "dev": "nodemon --exec \"yarn build:server && yarn build:i18n && node --inspect=0.0.0.0 build/server/index.js\" -e js --ignore build/ --ignore app/ --ignore flow-typed/", "lint": "eslint app server shared", "deploy": "git push heroku master", "postinstall": "yarn yarn-deduplicate yarn.lock", @@ -212,4 +212,4 @@ "js-yaml": "^3.13.1" }, "version": "0.57.0" -} +} \ No newline at end of file diff --git a/server/app.js b/server/app.js index 4ab9c9434..9d4086354 100644 --- a/server/app.js +++ b/server/app.js @@ -74,12 +74,9 @@ if (isProduction) { // display nothing to the console quiet: false, - // switch into lazy mode - // that means no watching, but recompilation on every request - lazy: false, - watchOptions: { - ignored: ["node_modules"], + poll: 1000, + ignored: ["node_modules", "flow-typed", "server", "build", "__mocks__"], }, // public path to bind the middleware to