polkawallet-io / sdk

polkawallet SDK for integrating substrate-based blockchain as a plugin.
Apache License 2.0
18 stars 24 forks source link

Use default rollup polkadot.js config instead of webpack #28

Open poka-IT opened 2 years ago

poka-IT commented 2 years ago

Why do you use webpack instead of the default rollup conf existing for polkadot.js ?

https://github.com/polkadot-js/api/blob/master/rollup.config.mjs

Is there a technical reason ?

Rollup greatly minimizes the size of the build file since it selects only what is needed. We thus go from 3.2MB currently generated by your webpack config to a few hundred KB

RomeroYang commented 2 years ago

cool, I will look into that.

RomeroYang commented 1 year ago

The js_api in sdk need to be backward compatible with some lower version webview for android devices. I tried rollup but the output can not run on my device for it has some advanced syntax.

Maybe you can try to see if you can come up with a working rollup config for this.