Due to changes to polyfills in webpack v5, the node-localstorage dependency which relies on fs cannot be used with react-scripts ^5.0.0. The xmtp-js README therefore guides developers to use lower versions of react-scripts.
Problem
Developers whose apps require react-scripts ^5.0.0 cannot use xmtp-js. Although the requirement to use a lower version of this module usually isn't an issue when starting a new app, it can be prohibitively difficult to downgrade an existing app that was created using an incompatible react-scripts version.
Goal
Remove dependencies that are incompatible with webpack v5 and react-scripts ^5.0.0.
Potential solution
Use a LocalStorage polyfill that doesn't require the filesystem and keeps the data in memory.
Context
Due to changes to polyfills in webpack v5, the
node-localstorage
dependency which relies onfs
cannot be used withreact-scripts ^5.0.0
. Thexmtp-js
README therefore guides developers to use lower versions ofreact-scripts
.Problem
Developers whose apps require
react-scripts ^5.0.0
cannot usexmtp-js
. Although the requirement to use a lower version of this module usually isn't an issue when starting a new app, it can be prohibitively difficult to downgrade an existing app that was created using an incompatiblereact-scripts
version.Goal
Remove dependencies that are incompatible with webpack v5 and
react-scripts ^5.0.0
.Potential solution
Use a LocalStorage polyfill that doesn't require the filesystem and keeps the data in memory.