From 91f39ef381c90749a4ed7411061643a316806928 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Fri, 17 Feb 2017 00:43:25 +0700 Subject: [PATCH 1/3] 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. --- packages/react-scripts/config/webpack.config.dev.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 642d73741a8..398988e5815 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -118,7 +118,8 @@ module.exports = { // Point ESLint to our predefined config. options: { configFile: path.join(__dirname, '../.eslintrc'), - useEslintrc: false + useEslintrc: false, + cache: true }, // @remove-on-eject-end loader: 'eslint-loader' From fb1be9d79702874531bd5e6240fed5bdc26a8f43 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Wed, 22 Feb 2017 19:26:19 +0700 Subject: [PATCH 2/3] Bump eslint-loader to 1.6.3 --- packages/react-scripts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index bd2a89a50d9..46f3a4e734d 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -39,7 +39,7 @@ "dotenv": "2.0.0", "eslint": "3.8.1", "eslint-config-react-app": "^0.5.1", - "eslint-loader": "1.6.1", + "eslint-loader": "1.6.3", "eslint-plugin-flowtype": "2.21.0", "eslint-plugin-import": "2.0.1", "eslint-plugin-jsx-a11y": "2.2.3", From 9629b948d82d4dc2e8cc4fbd183aeb12ae5ef3e1 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Wed, 22 Feb 2017 19:34:23 +0700 Subject: [PATCH 3/3] move @remove-on-eject block to persist cache config on eject --- packages/react-scripts/config/webpack.config.dev.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 398988e5815..0af6032cfb3 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -114,14 +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, + // @remove-on-eject-end cache: true }, - // @remove-on-eject-end loader: 'eslint-loader' }], include: paths.appSrc