Skip to content
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

Document using node.js modules in Snaps #1238

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Conversation

alexandratran
Copy link
Contributor

@alexandratran alexandratran commented Mar 29, 2024

This PR slightly rearranges the "Snaps execution environment" concept page and adds a note on how to use the Node.js built-in modules, which are not supported by default. It also documents the missing polyfills config option. Fixes #855.

Preview: https://docs.metamask.io/855-nodejs-modules/snaps/learn/about-snaps/execution-environment/

@alexandratran alexandratran requested review from a team as code owners March 29, 2024 22:50
Copy link

Preview published: 855-nodejs-modules

Copy link

Preview published: 855-nodejs-modules

Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a polyfills option in the config which doesn't require changing the Webpack config. Looks like we forgot to add this to the CLI's README 😅

Copy link

Preview published: 855-nodejs-modules

1 similar comment
Copy link

Preview published: 855-nodejs-modules

Copy link
Contributor

@joaniefromtheblock joaniefromtheblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexandratran alexandratran merged commit fcfc115 into main Apr 1, 2024
8 checks passed
@alexandratran alexandratran deleted the 855-nodejs-modules branch April 1, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to use native Node.js modules in snaps
3 participants