Skip to content

Commit

Permalink
Merge pull request #20 from casper-ecosystem/dev/new-buffer-polyfill
Browse files Browse the repository at this point in the history
fixed polyfill for buffer in webpack
  • Loading branch information
Maciej Zieliński authored Mar 26, 2021
2 parents edf881e + c87620f commit a69eb5b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ All notable changes to casper-client-sdk.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.34

### Fixed

- Problems with Buffer polyfill not working in browser

## 1.0.32

### Added

- `CasperServiceByJsonRPC.getBlockInfoByHeight(height)`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "casper-client-sdk",
"version": "1.0.33",
"version": "1.0.34",
"license": "Apache 2.0",
"description": "SDK to interact with the Casper blockchain",
"main": "dist/lib.node.js",
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ const clientConfig = {
fallback: {
stream: require.resolve('stream-browserify'),
asert: require.resolve('assert'),
buffer: require.resolve('buffer/'),
fs: false
}
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser'
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
})
],
output: {
Expand Down

0 comments on commit a69eb5b

Please sign in to comment.