using the nextjs framework, how to introduce antd, and load on demand.
using the nextjs framework, how to introduce antd, and load on demand.
refer to https://github.com/zeit/next.
introduce antd-related files
the same question, have you solved
yarn add antd
yarn add babel-plugin-import// .babelrc
{
  "presets": ["next/babel"],
  "plugins": [
    [
      "import",
      {
        "libraryName": "antd",
        "style": "css" // `style: true`  less 
      }
    ]
  ]
}//
import { Button, Switch } from "antd";
<>
    <Button>Index page</Button>
    <Switch defaultChecked onChange={onChange} />
  </>Previous: PHP downloads remote files with no file suffix
Next: How k8s invokes or provides services across namespaces