diff --git a/webpack.config.js b/webpack.config.js index aec29fe..03e619d 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/'),