meteor-import-antd

1.2.1 • Public • Published

meteor-import-antd

A workaround for whom wants to use antd with meteor.

Why ?

please refer to this meteor/babel issue

The purpose of this package is to free you of double imports per component (the component by itself plus its style). By using it, you'll just need one import.

How to use it ?

import Skeleton from 'meteor-import-antd/Skeleton';

instead of recommanded :

import 'antd/lib/skeleton/style/index.css';
import Skeleton from 'antd/lib/skeleton';

By the way, you'll also have to import global styles by yourself on a top level component, or in a GlobalStyle if you use styled-component :

import { createGlobalStyle } from 'styled-components';
import antdReset from 'antd/lib/style/v2-compatible-reset.css';
import antdStyle from 'antd/lib/style/index.css';

const GlobalStyle = createGlobalStyle`
  ${antdStyle}
  ${antdReset}
`;

export default GlobalStyle;

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i meteor-import-antd

    Weekly Downloads

    1

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    17.6 kB

    Total Files

    64

    Last publish

    Collaborators

    • liitfr