Import {Button} from 'antd' sub-module loading, how to do it

when import {Button} from "antd", is packaged, only button is packaged and loaded in modules. How do you do that?


is processed through babel-plugin-import configuration.

{
  "plugins": [
    ["import", {
      "libraryName": "antd",
      "libraryDirectory": "es",
      "style": "css"
    }]
  ]
}

is equivalent to

import Button from 'antd/es/button';
import 'antd/es/button/style/css';

you can check the relevant files under node_modules/antd for yourself.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf6480-31fd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf6480-31fd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?