algorand / algorand/js-algorand-sdk

Polyfill node libraries within the sdk

Aperta
#645 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub
new-feature-request Team Lamprey
Lingua principale
TypeScript
Stelle
297
Fork
214
Merge medio
1h 3m
PR unite (30g)
3

Descrizione

## Problem

According to the FAQ page:

> Webpack 5 no longer auto-polyfills some of the node modules used by this sdk. You will have to polyfill them to fix any errors regarding missing modules.

It seems that most sdk maintainers in the industry have opted for doing package level polyfills and automatically including checks to see crypto, buffer, and other relevant libraries are available instead of asking for the user to polyfill on their end.

It seems the direction that the Algorand SDK has chosen will cause more problems for its users not experienced with webpack or are simply looking for a hassle free way to start building with Algorand. I believe this is net detrimental to the developer experience.

## Solution

Including all relevant polyfill libraries and do a sanity check to see if a native version exists given the execution environment instead of asking users to do polyfills.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.