相关疑难解决方法(0)

如何配置react-script以便它不会覆盖'start'上的tsconfig.json

我目前正在使用create-react-app我的一个项目来引导它.基本上,我试图在tsconfig.json中设置路径,方法是将它们添加到create-react-app生成的默认tsconfig.json中:

"baseUrl": "./src",
"paths": {
  "interfaces/*": [
    "common/interfaces/*",
  ],
  "components/*": [
    "common/components/*",
  ],
},
Run Code Online (Sandbox Code Playgroud)

但是,每次运行yarn start基本上都运行时react-scripts start,它会删除我的更改并再次生成默认配置.

如何告诉create-react-app使用我的自定义配置?

typescript reactjs react-scripts create-react-app

16
推荐指数
3
解决办法
5002
查看次数