Skip to content

Commit

Permalink
fix: ponyfill Buffer in browser
Browse files Browse the repository at this point in the history
Fixes error: ReferenceError: Buffer is not defined
  • Loading branch information
davidyuk committed Jun 5, 2021
1 parent 798ab63 commit 953bf08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ function configure (filename, opts = {}) {
},
plugins: [
...opts.target === 'node' ? [] : [new webpack.ProvidePlugin({
process: 'process'
process: 'process',
Buffer: ['buffer', 'Buffer']
})],
...argv.report ? [new BundleAnalyzerPlugin({
analyzerMode: 'static',
Expand Down

0 comments on commit 953bf08

Please sign in to comment.