create-react-app Typescript 4.1:冗余的控制台输出

yvt65v4c  于 2个月前  发布在  React
关注(0)|答案(1)|浏览(18)

运行 react-scripts build 总是会导致在控制台打印出相同的信息,尽管已经应用了更改到 tsconfig.json

$ yarn build
yarn run v1.22.0
$ react-scripts build
The following changes are being made to your tsconfig.json file:
  - compilerOptions.jsx must be react-jsx (to support the new JSX transform in React 17)

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}
"react-scripts": "4.0.0"

相关问题