From c87620fd99f02d1bd0cd5721b2a1637bfd988369 Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Fri, 26 Mar 2021 18:24:20 +0100 Subject: [PATCH] new polyfill for buffer in webpack --- CHANGELOG.md | 7 +++++++ package.json | 2 +- webpack.config.js | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d33a337..56f16d7eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)` diff --git a/package.json b/package.json index 519472b40..5d3a5d78e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index 26b8c5089..dba649811 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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: {