openimsdk / open-im-sdk-web-wasm

JS SDK for OpenIM Web use by Webassembly of go
https://openim.io
Apache License 2.0
33 stars 46 forks source link

Does it support mini-programs? The maximum size for a mini-program package is 2MB. Can this package, which is 5MB, be resolved? #41

Closed alamhubb closed 10 months ago

ZowieTao commented 1 year ago

Yes, currently there is a default sdk core exported wasm resource file in this package, so the size will be relatively large

alamhubb commented 1 year ago

Yes, currently there is a default sdk core exported wasm resource file in this package, so the size will be relatively large.

Hello, could you please specify how to solve the problem of the mini program's main package allowing a maximum of 2m and this library being 5m

Overclockers commented 1 year ago

I don't think it's supported. The content of indexeddb will be used inside. The mini program does not have a window object, unless you use H5 and nest the webview inside the mini program

ZowieTao commented 1 year ago

The main.wasm in assets in this package serves as a basic wasm resource, which can be forked out, deleted, and rebuilt. When running SDK, the address of the wasm resource passed in to the remote end should be a problem that can improve the size. For using indexdb to achieve db capability, other solutions can be used according to the specific environment

Bloomingg commented 10 months ago

You can use the pure JavaScript SDK for mini programs in the v3 version.https://github.com/openimsdk/open-im-sdk-web