Skip to content

Commit

Permalink
Fix buffer build
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 1, 2024
1 parent 61107e3 commit 8ac9191
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
const webpack = require('webpack')
const path = require('path')

module.exports = {
mode: 'production',
entry: './dist/index.js',
plugins: [
// this is needed to properly polyfill buffer in desktop, after the CRA5
// conversion it was observed cram, twobit, etc that use
// @gmod/binary-parser complained of buffers not being real buffers
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
resolve: {
fallback: {
buffer: require.resolve('buffer/'),
Expand Down

0 comments on commit 8ac9191

Please sign in to comment.