-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add browser docs #3329
Add browser docs #3329
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some general comments with questions/suggestions on how to proceed here.
|
||
Some of our libraries use Javascript APIs where the NodeJS and browser versions are not 100% equivalent. In these cases, these APIs need to be polyfilled when building for the browser. Below are known potential browser incompatibilities and polyfills that are known to work in browser. Please refer to your particular bundler/framework on guidance for how to leverage these polyfills in your application. | ||
|
||
- `events` - [`eventemitter3`](https://www.npmjs.com/package/eventemitter3) - Our usage of the native NodeJS `eventemitter` class apparently onflicts with the typing of the browser equivalent `eventemitter` and polyfilling with `eventemitter3` is known to resolve this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we are in discussion of also eliminate this major remaining gotcha, I wonder if there is enough substance left in the whole browser section to justify a separte document. 🤔
Basically only the examples left to stay for now.
Totally not against adding example projects, but maybe in this case we can move TEVM and Remix to the EVM, I would suggest a new section "External Projects" or "Using Projects" or similar in between here:
And Blobs4Every1 can go into the 4844 tx section of the tx library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
Here are some projects that use our libraries in browser to give you some inspiration. These are not guaranteed to be 100% up to date but give you some examples of projects that use our code. | ||
|
||
- [TEVM](https://github.com/evmts/tevm-monorepo) - a JavaScript EVM client and a Solidity-to-TypeScript compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
an idea to add to this is to addstack blitz example using ethereumjs in browser. Cool thing about that is you can get a forkable working example up and running in one click. I did an example of what this looks like for OP here: ethereum-optimism/docs#574 |
That's brilliant! I'm gonna have to try that out. |
Will close this, so much changed along the way and not necessarily the best way to integrate docs any more. |
This adds an initial readme for building for the browser.