diff --git a/docs/react/getting-started.en-US.md b/docs/react/getting-started.en-US.md index 84226e3e04..3909f9d486 100644 --- a/docs/react/getting-started.en-US.md +++ b/docs/react/getting-started.en-US.md @@ -161,11 +161,15 @@ There are some [scaffolds](https://github.com/ant-design/ant-design/issues/129) ## Import on Demand -If you see a log like below screenshot, you might import all components by writing `import { Button } from 'antd';`, this will affect your app's network perfermance. +If you see logs like below screenshot, you might import all components by writing `import { Button } from 'antd';`, this will affect your app's network perfermance. -> ![](https://zos.alipayobjects.com/rmsportal/vgcHJRVZFmPjAawwVoXK.png) +``` +You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size. +``` + +> ![](https://zos.alipayobjects.com/rmsportal/GHIRszVcmjccgZRakJDQ.png) -But, we can import individual components on demand: +However, we can import individual components on demand: ```jsx import Button from 'antd/lib/button'; diff --git a/docs/react/getting-started.zh-CN.md b/docs/react/getting-started.zh-CN.md index fe145f418f..7099a28f2b 100644 --- a/docs/react/getting-started.zh-CN.md +++ b/docs/react/getting-started.zh-CN.md @@ -159,9 +159,13 @@ IE8 需要配合使用 [react@0.14.x](https://facebook.github.io/react/blog/2016 ## 按需加载 -如果你在控制台看到下面的提示,则你可能使用了 `import { Button } from 'antd';` 的写法引入了 antd 下所有的模块,这会影响应用的网络性能。 +如果你在开发环境的控制台看到下面的提示,那么你可能使用了 `import { Button } from 'antd';` 的写法引入了 antd 下所有的模块,这会影响应用的网络性能。 -> ![](https://zos.alipayobjects.com/rmsportal/vgcHJRVZFmPjAawwVoXK.png) +``` +You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size. +``` + +> ![](https://zos.alipayobjects.com/rmsportal/GHIRszVcmjccgZRakJDQ.png) 可以通过以下的写法来按需加载组件。