Antd 2.0 released in English - the best React components library šŸ‘

Hi @enzolutions
As I said, AFAIK in Meteor 1.4.4.1 using antd with babel plugin import is still broken. Unless there is something you really need from Meteor version 1.4.4.1 for doing your development at the moment, I would recommend setting your project to use Meteor 1.4.2.6 (I think 1.4.2.7 is also still ok) - don’t use Meteor 1.4.4.1.

When you use Meteor 1.4.2.6, you can use antd the normal way that is described on antd’s website (there are clear instructions there but roughly: install antd and babel-plugin-import, add
["import", { "libraryName": "antd", "style": "css" }],
under ā€œpluginsā€ in your .babelrc file and in your source files include any components that you need with e.g.
import { Radio } from "antd";
That’s all you need and you don’t need to include css manually. It gets included

Oh I use Meteor 1.4.4.1, have the same problem @raycone.
Waiting to fix…

Is there anything new regarding the fix?

Still having the ā€˜You are using a whole package of antd…’ issue with meteor 1.6.1 ((
The only solution I’ve found is to use babel-plugin-import and import styles explicitly :open_mouth:

.babelrc:

  "plugins": [
    [
      "import",
      {
        "libraryName": "antd",
        "style": true
      }
    ],
    "viewmodel-react-plugin",
    "transform-class-properties"
  ]

app.js

import DatePicker from 'antd/lib/date-picker'
import 'antd/lib/date-picker/style/css'
1 Like

Btw, Antd is really huge!
When I import single DatePicker component my app grows in size for 400kb ungzipped!
Button component adds 150kb… and so on.

Hi All Dear,

I have failed to find the solution for changing the theme color from blue to green color please can any one help me ?
bundle of thanks in advance

Currently I created a variables.less file that is being imported after the antd.less file and defined @primary-1 -> @primary-10 variables and also the @primary-color: @primary-6 and everything works.

it is the second way suggested in the theming section of the library