mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
fix broken --react-import-path when path is different from "react"
This commit is contained in:
parent
5ccbfec25a
commit
12998d1022
@ -91,10 +91,11 @@ function reactImport(options) {
|
||||
if (options.native) {
|
||||
return reactNativeSupport[options.nativeTargetVersion].react.module;
|
||||
}
|
||||
if (_.includes(['0.14.0', '0.15.0', '15.0.0', '15.0.1'], options.targetVersion)) {
|
||||
return 'react';
|
||||
if (!options.reactImportPath) {
|
||||
const isNewReact = _.includes(['0.14.0', '0.15.0', '15.0.0', '15.0.1'], options.targetVersion);
|
||||
return isNewReact ? 'react' : 'react/addons';
|
||||
}
|
||||
return 'react/addons';
|
||||
return options.reactImportPath;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user