Skip to content

Commit

Permalink
Merge branch 'main' into rygine/filter-invalid-topics
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine authored Nov 30, 2023
2 parents b4836df + b7143e8 commit 3691bfc
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,15 @@ 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 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).

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`:
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`.

```js
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false
}
return config
}
```
For the list of browsers that don't support `BigInt`, see this [compatibility list](https://caniuse.com/bigint).

## Usage

Expand Down

0 comments on commit 3691bfc

Please sign in to comment.