When I'm importing antd components I still get You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.
console error, and component styles are not loaded.
Component example:
import {Card, Button} from 'antd';
import React, {PropTypes} from 'react';
class Login extends React.Component {
render() {
const { login, loginInProcess } = this.props;
return (
<div>
<Card
style={CARD_STYLE}
bordered={false}
>
<h2>Welcome</h2>
<Button
loading={loginInProcess}
onClick={login}
>
Sign In with google
</Button>
</Card>
</div>
);
}
}
I'm using
babel
configuration into mypackage.json
:When I'm importing
antd
components I still getYou are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.
console error, and component styles are not loaded.Component example: