labscommunity / arweavekit

https://docs.arweavekit.com
MIT License
10 stars 7 forks source link

Fix/browser issues #73

Closed pawanpaudel93 closed 1 year ago

pawanpaudel93 commented 1 year ago

ArweaveKit for Web

Context

As a developer, I want to use ArweaveKit in frontend projects built using Vite, Webpack, etc. As of now, there are several dependency-related issues. While building any frontend project that uses arweavekit, it fails with errors that are related to unsupported dependencies in a browser environment. Even after attempting to polyfill many packages involved in the issue, this still remains to be a problem.

Steps to reproduce

  1. start a new react project using Vite or Webpack

  2. install arweavekit with the command npm i arweavekit

  3. import createTransaction method from arweavekit/transaction

  4. build the app using npm run build

  5. Build fails

Bug Fixes

Manual Polyfill needed for @bundlr-network/client package in Vite & Webpack projects