I would like to ask what plug-ins can achieve functions similar to ant design on-demand loading.

recently, I am writing the company"s common component library. At present, the components written will be packaged twice. Once, when all the components are combined to generate a js and a css, the js and the css file are directly introduced, but sometimes only some components are needed, which is quite wasteful. So another packaging is that each component generates a corresponding js and a css file. But in the process of using, for example, if I want to use a component, I want to introduce the js file and css file of the component respectively, which is not very convenient to use. I want to introduce a big push. Now I want to do a way similar to ant design, which can achieve on-demand loading through import {xx, xx} from "antd". It seems to me that ant design is implemented through babel-plugin-import, but there is a problem with its own components. Is there any good solution?

Mar.07,2021

can be realized with babel-plugin-import . It may be that your method is
https://www.cnblogs.com/chris.

.
Menu