如何在弹出的create react应用程序中添加可选链接

问题描述 投票:0回答:1

在弹出的CRA中,我想添加可选的链接和其他功能。我要在webpack中执行此操作吗?我当前正在使用Typescript。

typescript create-react-app
1个回答
0
投票

在babel下的package.json中,添加以下内容:

"babel": {
    "presets": [
      "react-app"
    ],
    "plugins": [
      "@babel/plugin-proposal-optional-chaining"
    ]
  }
© www.soinside.com 2019 - 2024. All rights reserved.