Skip to content

Commit

Permalink
Merge pull request #238 from streamflow-finance/fix/polyfill-docs
Browse files Browse the repository at this point in the history
Update README.md - Add polyfills info
  • Loading branch information
RolginRoman authored Nov 29, 2024
2 parents 5c8a47a + 93a6a13 commit 2f0a916
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ npm i -s @streamflow/common @streamflow/distributor
yarn add @streamflow/common @streamflow/distributor
```

## Environments
For web browser runtimes polyfills might be required. SDKs use `node:` prefixed modules, for instance: `node:crypto`. However, transitive 3rd parties might use non-prefixed modules so both ways of importing should be polyfilled.

The easiest way to achieve it is using a bundler's plugin.
For polyfills take a look on these libraries:
1. Vite - https://www.npmjs.com/package/vite-plugin-node-polyfills
2. Rsbuild - https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill
3. Webpack - https://www.npmjs.com/package/node-polyfill-webpack-plugin

## Contributing

To contribute to this repository, please follow these steps:
Expand Down

0 comments on commit 2f0a916

Please sign in to comment.