b2nil / taro-ui-vue3

采用 Vue 3.0 重写的 Taro UI 组件库
https://b2nil.github.io/taro-ui-vue3/
MIT License
160 stars 51 forks source link

运行打包后 vue 以及ui组件 都被全部引入 没有按需引入 #64

Closed b2nil closed 3 years ago

b2nil commented 3 years ago

详见: taro issue #8203

b2nil commented 3 years ago

目前从 taro-ui-vue3(dist/index.esm.js) 中引入组件,暂不能实现按需引入,会出现整个包被引入的情况。

通过 webpack-bundle-analyzer 分析显示,整包引入的大小大致如下: index esm pnd

解决方案: 从 taro-ui-vue3/lib 下按需引入组件,这样能大幅减少打包大小。