How can both antd and antd-mobile, be loaded on demand when both antd and antd-mobile, are needed in a react project?

antd and antd-mobile are both loaded on demand:
/ / webpack before configuration

          plugins: ["transform-runtime", ["import", {
            "libraryName": "antd-mobile",
            "style": true
          }]]

/ / webpack modified configuration

          plugins: ["transform-runtime", ["import", {
            "libraryName": "antd-mobile",
            "style": true
          },
          {
            "libraryName": "antd",
            "style": true    
          }]]

/ / then referenced in the page,
clipboard.png
//

clipboard.png
indicates that this method is wrong. How to configure two demand loads in the plug-in?

Jun.26,2021

try to write like this

{
  "plugins":[["import",[
  {
    "libraryName": "antd",
    "libraryDirectory": "lib",   // default: lib
    "style": true
  },
  {
    "libraryName": "antd-mobile",
    "libraryDirectory": "component",
  },
]]]
}
  • Ant design tabbar's icon does not display

    import mineIcon from .. assets image icon mine.png ; import mineDarkIcon from .. assets image icon mine_dark.png ; import orderListIcon from .. assets image icon order_list.png ; import orderListDarkIcon from .. assets image icon order_lis...

    Mar.03,2021
Menu