You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2025. It is now read-only.
我看 https://wechat-miniprogram.github.io/kbone/docs/ui/intro/quickstart.html 文档里面按需引入所需组件的时候,还需要要么引入所有的样式(即使只用到了其中一两个组件,希望可以仅仅引入所需组件的样式),另外按需引入的时候还需要单独引入样式(目前是所有的样式),如果按需引入较多组件,又或者按需引入的组件经常变化,需要同时维护js和css的引入,有些不方便。
可以参考 antd ( https://ant.design/docs/react/getting-started-cn#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD ) 、vuetify ( https://vuetifyjs.com/en/features/treeshaking/#required-styles ) 等实现方式,通过 loader ( https://github.com/ant-design/babel-plugin-import, https://github.com/vuetifyjs/vuetify-loader ) 插件,代码中只需要引入js组件,相关联的css就可以自动引入,可以非常智能的针对按需引入或者全部引入。