@ -11,9 +11,9 @@ Before delving into Ant Design React, a good knowledge of [React](http://faceboo
## First Example
The following CodePen demo is the simplest use case, and it's also a good habit to fork this demo to provide a re-producible demo while reporting a bug. Please don't use this demo as a scaffold in production.
The following CodeSandbox demo is the simplest use case, and it's also a good habit to fork this demo to provide a re-producible demo while reporting a bug. Please don't use this demo as a scaffold in production.
@ -90,11 +90,13 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
// .babelrc or babel-loader option
{
"plugins": [
["import", { "libraryName": "antd", "style": "css" }] // `style: true` for less
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }] // `style: true` for less
]
}
```
> Note: Don't set `libraryDirectory` if you are using webpack 1.
This allows you to import components from antd without having to manually import the corresponding stylesheet. The antd babel plugin will automatically import stylesheets.
```jsx
@ -127,13 +129,13 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'