mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
parent
de212266c4
commit
c7a57302ed
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user