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

同时按需引入两个组件,官方的配置报错,如何配置

Open Evis5 opened this issue 6 years ago • 1 comments

按照这样子配置 { "plugins": [xxx, ["component", { libraryName: "antd", style: true, }, "antd"], ["component", { libraryName: "test-module", style: true, }, "test-module"] ] } 跑起来就报错了, 修改成{ "plugins": [xxx, ["component", { libraryName: "antd", style: true, }, { libraryName: "test-module", style: true, }] ] } 跑起来没有问题,但打包后发现第二个“test-module”组件库的按需引入没有起到作用,即使按需引入也引入了整个包。 求大神帮解决哈

Evis5 avatar Jul 30 '19 03:07 Evis5

Try this Component directory structure, https://github.com/ElementUI/babel-plugin-component/pull/52/files

tongtong68 avatar Aug 20 '19 07:08 tongtong68