docs: instruction about antd/es/button

pull/11472/merge
afc163 7 years ago
parent 510add6305
commit f78a78e03b

@ -188,6 +188,8 @@ import Button from 'antd/lib/button';
import 'antd/lib/button/style'; // or antd/lib/button/style/css for css format file
```
> `antd/es/button` to import es version module for tree shaking.
We strongly recommend using [babel-plugin-import](https://github.com/ant-design/babel-plugin-import), which can convert the following code to the 'antd/lib/xxx' way:
```jsx

@ -188,6 +188,8 @@ import Button from 'antd/lib/button';
import 'antd/lib/button/style'; // 或者 antd/lib/button/style/css 加载 css 文件
```
> `antd/es/button` 可以加载 ES 版本的模块,方便进一步 Tree Shake.
如果你使用了 babel那么可以使用 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) 来进行按需加载,加入这个插件后。你可以仍然这么写:
```jsx

Loading…
Cancel
Save