Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use new JSX setting with TypeScript 4.1.0
  • Loading branch information
iansu committed Oct 23, 2020
commit dccc7fcde7e910cc4316adc8c91788c1b000797b
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const resolve = require('resolve');
const path = require('path');
const paths = require('../../config/paths');
const os = require('os');
const semver = require('semver');
const immer = require('react-dev-utils/immer').produce;
const globby = require('react-dev-utils/globby').sync;

Expand Down Expand Up @@ -133,7 +134,8 @@ function verifyTypeScriptSetup() {
noEmit: { value: true },
jsx: {
parsedValue: ts.JsxEmit.React,
suggested: 'react',
value: semver.gte(ts.version, '4.1.0-beta') ? 'react-jsx' : 'react',
reason: 'to support the new JSX transform in React 17'
},
paths: { value: undefined, reason: 'aliased imports are not supported' },
};
Expand Down