File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/react-scripts/scripts/utils Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const resolve = require('resolve');
14
14
const path = require ( 'path' ) ;
15
15
const paths = require ( '../../config/paths' ) ;
16
16
const os = require ( 'os' ) ;
17
+ const semver = require ( 'semver' ) ;
17
18
const immer = require ( 'react-dev-utils/immer' ) . produce ;
18
19
const globby = require ( 'react-dev-utils/globby' ) . sync ;
19
20
@@ -133,7 +134,8 @@ function verifyTypeScriptSetup() {
133
134
noEmit : { value : true } ,
134
135
jsx : {
135
136
parsedValue : ts . JsxEmit . React ,
136
- suggested : 'react' ,
137
+ value : semver . gte ( ts . version , '4.1.0-beta' ) ? 'react-jsx' : 'react' ,
138
+ reason : 'to support the new JSX transform in React 17'
137
139
} ,
138
140
paths : { value : undefined , reason : 'aliased imports are not supported' } ,
139
141
} ;
You can’t perform that action at this time.
0 commit comments