From 8ac919158ccdf13343d058207473e46e5effd3c3 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 1 Aug 2024 09:42:07 -0400 Subject: [PATCH] Fix buffer build --- webpack.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index aec29fee..03e619de 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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/'),