📝 Fix use-in-typescript documentation

close #14776
This commit is contained in:
afc163 2019-02-11 13:44:56 +08:00
parent de212266c4
commit c7a57302ed
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
4 changed files with 7 additions and 7 deletions

View File

@ -79,10 +79,10 @@ For instance, we actually import all styles of components in the project which m
Now we need to customize the default webpack config. We can achieve that by using [react-app-rewired](https://github.com/timarney/react-app-rewired) which is one of create-react-app's custom config solutions.
Import react-app-rewired and modify the `scripts` field in package.json.
Import react-app-rewired and modify the `scripts` field in package.json. Due to new [react-app-rewired@2.x](https://github.com/timarney/react-app-rewired#alternatives) issue, you shall need [customize-cra](https://github.com/arackaf/customize-cra) along with react-app-rewired.
```
$ yarn add react-app-rewired
$ yarn add react-app-rewired customize-cra
```
```diff

View File

@ -78,10 +78,10 @@ export default App;
此时我们需要对 create-react-app 的默认配置进行自定义,这里我们使用 [react-app-rewired](https://github.com/timarney/react-app-rewired) (一个对 create-react-app 进行自定义配置的社区解决方案)。
引入 react-app-rewired 并修改 package.json 里的启动配置。
引入 react-app-rewired 并修改 package.json 里的启动配置。由于新的 [react-app-rewired@2.x](https://github.com/timarney/react-app-rewired#alternatives) 版本的关系,你需要还需要安装 [customize-cra](https://github.com/arackaf/customize-cra)。
```
$ yarn add react-app-rewired
$ yarn add react-app-rewired customize-cra
```
```diff

View File

@ -95,7 +95,7 @@ For instance, we actually import all styles of components in the project which m
Now we need to customize the default webpack config. We can achieve that by using [react-app-rewired](https://github.com/timarney/react-app-rewired) which is one of create-react-app's custom config solutions.
Import react-app-rewired and modify the `scripts` field in package.json. Due to new `react-app-rewired@2.x` versions, you have to install customize-cra along with react-app-rewired.
Import react-app-rewired and modify the `scripts` field in package.json. Due to new [react-app-rewired@2.x](https://github.com/timarney/react-app-rewired#alternatives) issue, you shall need [customize-cra](https://github.com/arackaf/customize-cra) along with react-app-rewired.
```
$ yarn add react-app-rewired customize-cra

View File

@ -90,9 +90,9 @@ export default App;
我们现在已经把组件成功运行起来了,但是在实际开发过程中还有很多问题,例如上面的例子实际上加载了全部的 antd 组件的样式(对前端性能是个隐患)。
此时我们需要对 create-react-app 的默认配置进行自定义,这里我们使用 [react-app-rewired](https://github.com/timarney/react-app-rewired) (一个对 create-react-app 进行自定义配置的社区解决方案)。由于新的 `react-app-rewired@2.x` 版本的关系,你必须安装 customize-cra 以及 react-app-rewired 。
此时我们需要对 create-react-app 的默认配置进行自定义,这里我们使用 [react-app-rewired](https://github.com/timarney/react-app-rewired) (一个对 create-react-app 进行自定义配置的社区解决方案)。
引入 react-app-rewired 并修改 package.json 里的启动配置。
引入 react-app-rewired 并修改 package.json 里的启动配置。由于新的 [react-app-rewired@2.x](https://github.com/timarney/react-app-rewired#alternatives) 版本的关系,你需要还需要安装 [customize-cra](https://github.com/arackaf/customize-cra)。
```
$ yarn add react-app-rewired customize-cra