Skip to content

Commit

Permalink
Merge pull request #1646 from storybooks/fix-vue-webpack
Browse files Browse the repository at this point in the history
Check for React presence when detecting `WEBPACK_REACT` type
  • Loading branch information
Hypnosphi authored Aug 19, 2017
2 parents 666eafe + a7181ac commit 0d5624c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/cli/lib/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,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;
}

Expand Down

0 comments on commit 0d5624c

Please sign in to comment.