From 0c4ef42e346f801c5c08f625618325cd13b7c5b1 Mon Sep 17 00:00:00 2001 From: hypnos Date: Sat, 12 Aug 2017 18:12:49 +0300 Subject: [PATCH] Check for React presence when detecting `WEBPACK_REACT` type --- lib/cli/lib/detect.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/cli/lib/detect.js b/lib/cli/lib/detect.js index 52b6986fdadc..1f88e535bb87 100644 --- a/lib/cli/lib/detect.js +++ b/lib/cli/lib/detect.js @@ -48,7 +48,12 @@ module.exports = function detect(options) { return types.REACT_SCRIPTS; } - if (packageJson.devDependencies && packageJson.devDependencies.webpack) { + if ( + ((packageJson.devDependencies && packageJson.devDependencies.webpack) || + (packageJson.dependencies && packageJson.dependencies.webpack)) && + ((packageJson.devDependencies && packageJson.devDependencies.react) || + (packageJson.dependencies && packageJson.dependencies.react)) + ) { return types.WEBPACK_REACT; }