Open ericpassmore opened 2 years ago
npm install -D buffer
const webpackConfig = { ... resolve: { ... fallback: { buffer: require.resolve('buffer/'), }, }, };
const webpackConfig = { ... plugins: [ new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], }), ] };
const Buffer = require('buffer/').Buffer;
Option 1 Recode Buffer to user our own
Option 2 Webpack Buffer into Distribution
npm install -D buffer