From 5308a4fbc9b8e8c1c42e4b03e82fad5f2bc48336 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 29 Nov 2023 15:37:28 -0600 Subject: [PATCH 1/3] docs: add note about BigInt polyfills --- README.md | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index d2a0873a1..39b995c88 100644 --- a/README.md +++ b/README.md @@ -37,30 +37,13 @@ Additional configuration is required in React environments due to the removal of ## Troubleshoot -If you get into issues with Buffer and polyfills check out our [fix below](https://xmtp.org/docs/developer-quickstart#troubleshooting). +### Buffer polyfill -### Create React App +If you get into issues with Buffer and polyfills check out our [solutions](https://xmtp.org/docs/faq#why-my-app-is-failing-saying-buffer-is-not-found). -Use `react-scripts` prior to version `5.0.0`. For example: +### BigInt polyfill -```bash -npx create-react-app my-app --scripts-version 4.0.2 -``` - -Or downgrade after creating your app. - -### Next.js - -In `next.config.js`: - -```js -webpack: (config, { isServer }) => { - if (!isServer) { - config.resolve.fallback.fs = false - } - return config -} -``` +Some older browsers do not support `BigInt` (see [compatibility list](https://caniuse.com/bigint)). Unfortunately, the way this SDK uses `BigInt` is incompatible with polyfills. To ensure that a polyfill is not added to your application bundle, update your [browserslist](https://github.com/browserslist/browserslist) configuration to exclude browsers that don't support `BigInt`. ## Usage From a2b3861a019a9f427b20b36a16a5186f3ffd1cf6 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 29 Nov 2023 17:16:48 -0600 Subject: [PATCH 2/3] Update README.md Co-authored-by: J-Ha <5481259+jhaaaa@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39b995c88..7655d7dc8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Additional configuration is required in React environments due to the removal of ### Buffer polyfill -If you get into issues with Buffer and polyfills check out our [solutions](https://xmtp.org/docs/faq#why-my-app-is-failing-saying-buffer-is-not-found). +If you run into issues with Buffer and polyfills, see this [solution](https://xmtp.org/docs/faq#why-my-app-is-failing-saying-buffer-is-not-found). ### BigInt polyfill From cc92dd9a08d581c174d742e2a8593f9cb3a6d1c8 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 29 Nov 2023 17:17:10 -0600 Subject: [PATCH 3/3] Update README.md Co-authored-by: J-Ha <5481259+jhaaaa@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7655d7dc8..708f08cc0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ If you run into issues with Buffer and polyfills, see this [solution](https://xm ### BigInt polyfill -Some older browsers do not support `BigInt` (see [compatibility list](https://caniuse.com/bigint)). Unfortunately, the way this SDK uses `BigInt` is incompatible with polyfills. To ensure that a polyfill is not added to your application bundle, update your [browserslist](https://github.com/browserslist/browserslist) configuration to exclude browsers that don't support `BigInt`. +This SDK uses `BigInt` in a way that's incompatible with polyfills. To ensure that a polyfill isn't added to your application bundle, update your [browserslist](https://github.com/browserslist/browserslist) configuration to exclude browsers that don't support `BigInt`. + +For the list of browsers that don't support `BigInt`, see this [compatibility list](https://caniuse.com/bigint). ## Usage