From b828746571fa15cc6012ff07caca116fcc576850 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 --- config/webpack.config.dev.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 642d73741a8..0af6032cfb3 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -114,13 +114,14 @@ module.exports = { test: /\.(js|jsx)$/, enforce: 'pre', use: [{ - // @remove-on-eject-begin - // Point ESLint to our predefined config. options: { + // @remove-on-eject-begin + // Point ESLint to our predefined config. configFile: path.join(__dirname, '../.eslintrc'), - useEslintrc: false + useEslintrc: false, + // @remove-on-eject-end + cache: true }, - // @remove-on-eject-end loader: 'eslint-loader' }], include: paths.appSrc