Ant-design-pro: 🐛[BUG] update `jsx: "react"` into `jsx: "react-jsx"` to suport the new JSX transform in React 17 in tsconfig.json

Created on 30 Nov 2020  ·  4Comments  ·  Source: ant-design/ant-design-pro

🐛 bug 描述

update `jsx: "react"` into `jsx: "react-jsx"` to suport the new JSX transform in React 17 in tsconfig.json

© 版本信息

  • Ant Design Pro 版本: 6.5.16
  • umi 版本 3.2.28
  • 浏览器环境 Chrome 89
  • 开发环境 Windows 10
🏔 Scaffold 🛑 bug

All 4 comments

vsocde 还没准备好,等vscode 准备好了就可以修改默认配置了

请问这个怎么解决的

先忽略 等vscode发版本

解决方法:

确保 typescript 的依赖安装完成,随便打开一个提示错误的 .tsx 文件。

macOS 使用 command + shift + p,Windows 貌似是 ctrl + shift + p 。

然后输入 TypeScript ,不出意外的话你会看到 Select Typescript Version 选项。
选择 node_modules 下的那个版本(一般来说都会比较新)。

一般来说就没有问题了。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

2uncle-code picture 2uncle-code  ·  3Comments

renyi818 picture renyi818  ·  3Comments

cheung1111 picture cheung1111  ·  3Comments

952425340 picture 952425340  ·  3Comments

yjz1004 picture yjz1004  ·  3Comments