babel-plugin-import icon indicating copy to clipboard operation
babel-plugin-import copied to clipboard

How to configure antd and antd-mobile in plugin at the same time ?

Open xiaobaimao-wan opened this issue 6 years ago • 2 comments

How to configure antd and antd-mobile in plugin at the same time ?

xiaobaimao-wan avatar Jul 05 '18 03:07 xiaobaimao-wan

I want to use antd and antd-mobile together in my project ,but I try many times to configure it ,but never succeed; The following is my configuration: "plugins": [ "external-helpers", [ "transform-runtime", { "polyfill": false } ], [ "import", { "style": true, "libraryName": "antd-mobile" }, "antd-mobile" ], [ "import", { "libraryName": "antd", "camel2DashComponentName": false }, "antd" ] ] ... but the browser still showing the tip :You are using a whole package of antd-mobile, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.

How to deal with ??

xiaobaimao-wan avatar Jul 05 '18 03:07 xiaobaimao-wan

我是这样写的,也不起作用 plugins: [ ["import", { libraryName: "antd", libraryDirectory: "es", style: true }], ["import", { libraryName: "antd-mobile", libraryDirectory: "es", style: true }] ] 同样的的问题,求解

hkaikai avatar Jul 11 '18 13:07 hkaikai