From bf11b144a61ddf34390437ba18dabf34166d46b7 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Sat, 25 Feb 2017 03:29:25 +0700 Subject: [PATCH] Enable eslint caching in development (#1578) * Enable eslint caching in development POC for https://github.com/facebookincubator/create-react-app/issues/740. Haven't found any problem, build times improved about 1s on my project and machine. * Bump eslint-loader to 1.6.3 * move @remove-on-eject block to persist cache config on eject --- packages/react-scripts/config/webpack.config.dev.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 0109eb6e4ac..a2e9d4d823c 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -177,13 +177,14 @@ module.exports = { // Remember to add the new extension(s) to the "url" loader exclusion list. ] }, - // @remove-on-eject-begin // Point ESLint to our predefined config. eslint: { + // @remove-on-eject-begin configFile: path.join(__dirname, '../.eslintrc'), - useEslintrc: false + useEslintrc: false, + // @remove-on-eject-end + cache: true }, - // @remove-on-eject-end // We use PostCSS for autoprefixing only. postcss: function() { return [