verida / verida-js

The Verida SDK provides several SDKs to interact with the Verida Network
https://developers.verida.network
ISC License
1.32k stars 38 forks source link

Investigate potential alternatives to NodeJS modules #271

Open aurelticot opened 1 year ago

aurelticot commented 1 year ago

Some of the libraries in this repository use NodeJS modules in their code.

These libraries are meant to be used either in a NodeJS app or in the browser. When in browser the NodeJS modules used in the code must be replaced by polyfills. This used to be done automatically by bundlers such as webpack.

But since version 5, webpack doesn't replace by the polyfills anymore (intentionally). This must be done by the developer building its app. Popular tools such as create-react-app embed webpack and hide its configuration, making dealing with the polyfills more difficult, having to use another tool like react-app-rewired to override the configuration.

To avoid such DX, it would be worth investigating where, in this repository, NodeJS modules are used, either directly or via the dependencies, and find potential alternative not relying on NodeJS module.

aurelticot commented 1 year ago

As a reference https://github.com/facebook/create-react-app/issues/11756#issuecomment-996464456