client-sdk-js icon indicating copy to clipboard operation
client-sdk-js copied to clipboard

JS SDK依赖项过大

Open ghost opened this issue 4 years ago • 6 comments

我在开发微信小程序时,使用云开发模式,允许用户在node.js环境下上传不大于500MB的单个云函数,但是我发现JS SDK的整个包太大了,几乎达到了1GB,这让我头很大。

同时我分析了被使用到的require('web3'),我发现其中有大部分的node_module依赖项是重复出现的,所以能否做个优化,将多次出现的node_module去除,或者整合到一个文件夹内,求求你们优化一下吧,我真的很想让大家打开微信就能自己铸造NFT。

ghost avatar Oct 14 '21 08:10 ghost

@luo-dahui @lifapan 麻烦确认下是否可以优化

biganxin avatar Oct 20 '21 03:10 biganxin

@ranchange 你好,此仓库的dist目录下面有个轻量级的sdk文件web3p.js,是否满足使用;

DavidRomy avatar Oct 21 '21 02:10 DavidRomy

你好,我看到web3p.js里面有几个require引用,但是找不到对应的文件在哪里,它的使用方法是什么?是否也需要npm install PlatONnetwork-client-sdk-js?

------------------ 原始邮件 ------------------ 发件人: "PlatONnetwork/client-sdk-js" @.>; 发送时间: 2021年10月21日(星期四) 上午10:10 @.>; @.@.>; 主题: Re: [PlatONnetwork/client-sdk-js] JS SDK依赖项过大 (#86)

@ranchange 你好,此仓库的dist目录下面有个轻量级的sdk文件web3p.js,是否满足使用;

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

ghost avatar Oct 21 '21 02:10 ghost

@ranchange 缺少的是@types,不需要安装client-sdk-js

DavidRomy avatar Oct 21 '21 02:10 DavidRomy

我把这份web3p.js保存下来后,使用npm install @@.***"。标签可能没有encodeURIComponent所编码的任何字符。

这种情况该如何解决?

------------------ 原始邮件 ------------------ 发件人: "PlatONnetwork/client-sdk-js" @.>; 发送时间: 2021年10月21日(星期四) 上午10:28 @.>; @.@.>; 主题: Re: [PlatONnetwork/client-sdk-js] JS SDK依赖项过大 (#86)

@ranchange @.***,不需要安装client-sdk-js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

ghost avatar Oct 21 '21 02:10 ghost

Bounty: The JS SDK repeatedly introduces the same dependencies, resulting in an oversized SDK installation package, which is expected to be optimized. Welcome to reply and claim the bounty

biganxin avatar Oct 21 '21 02:10 biganxin