aleph-im / aleph-sdk-ts

A TypeScript SDK to interact with the Aleph I.M. network.
https://aleph-im.github.io/aleph-sdk-ts/
MIT License
11 stars 9 forks source link

Vite projects not loading Node.js polyfills #167

Closed MHHukiewitz closed 3 months ago

MHHukiewitz commented 3 months ago

While the SDK works as intended with React and Node.js projects, running it in Vite projects requires an additional troubleshooting step.

Vite recognizes the Node.js dependencies like buffer or events as externalized and does not seem to load bundled Node.js polyfills.

image_2024-03-11_17-14-23

Reproduction

For an example repo where this happens, see: https://github.com/hoh/test-aleph-ts-sdk

Troubleshooting

A troubleshooting guide how to fix this for your own Vite project has been published: https://docs.aleph.im/libraries/typescript-sdk/troubleshooting/

MHHukiewitz commented 3 months ago

Has been fixed in v1.0.0