使用create-react-app --typescript生成的项目,不能使用ts的alias?
发布于 7 年前 作者 wangchaoduo 7112 次预览 最后一次回复是 7 年前 来自 问答
$ react-scripts start
The following changes are being made to your tsconfig.json file:
- compilerOptions.jsx must be preserve (JSX is compiled by Babel)
- compilerOptions.baseUrl must not be set (absolute imports are not supported (yet))
- compilerOptions.paths must not be set (aliased imports are not supported)
给tsconfig添加上baseUrl、paths属性后便会出现以上log,然后tsconfig中的内容会自动被删除,有没有朋友碰到过同样的问题的。
1 回复
贴一下自动生成的tsconfig