From c7a57302ed8e22fa5999b29bccbfd7ff0caa54ac Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 11 Feb 2019 13:44:56 +0800 Subject: [PATCH] :memo: Fix use-in-typescript documentation close #14776 --- docs/react/use-in-typescript.en-US.md | 4 ++-- docs/react/use-in-typescript.zh-CN.md | 4 ++-- docs/react/use-with-create-react-app.en-US.md | 2 +- docs/react/use-with-create-react-app.zh-CN.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/react/use-in-typescript.en-US.md b/docs/react/use-in-typescript.en-US.md index e2050872f1..416c81854d 100644 --- a/docs/react/use-in-typescript.en-US.md +++ b/docs/react/use-in-typescript.en-US.md @@ -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 diff --git a/docs/react/use-in-typescript.zh-CN.md b/docs/react/use-in-typescript.zh-CN.md index baaf42a43b..b83b9ab6f9 100644 --- a/docs/react/use-in-typescript.zh-CN.md +++ b/docs/react/use-in-typescript.zh-CN.md @@ -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 diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index d164cf8860..6568ca6f37 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/docs/react/use-with-create-react-app.en-US.md @@ -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 diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index 92fb20fdf2..ad8eec2b2b 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/docs/react/use-with-create-react-app.zh-CN.md @@ -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