Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uni-data-picker 和 uni-data-pickerview 打包编译后占用了 290kb 的大小 #968

Open
QianSeNianHua opened this issue Nov 11, 2024 · 1 comment

Comments

@QianSeNianHua
Copy link

QianSeNianHua commented Nov 11, 2024

版本

@dcloudio/uni-ui: "1.5.7"
编译目标: 微信小程序
node: "14.21.2"
npm: 6.14.17
系统: Windows 10 22H2

问题

我只是在页面上引用了 uni-data-picker 组件,代码如下

<uni-data-picker placeholder="请选择工单类型" popup-title="工单类型" :localdata="workOrderType" v-model="taskSubTypeId" :clearIcon="false" />
data() {
  return {
    workOrderType: [],
    taskSubTypeId: '',
  }
}

然后,当我打包编译后大小是 2.13MB
最后,我把这个组件从页面上删除使用后,打包编译后大小是 1.84MB

问题原因

这对于主包总体积不能超过 2MB 的要求来说,这个组件占用了 296kb 影响了我打包后的小程序的总体积的。

@zeMingGit
Copy link

分包会不会解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants