Skip to content

Commit df9d0a0

Browse files
committed
webpack: provide Buffer
1 parent cda10bc commit df9d0a0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path');
22
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
3+
const { ProvidePlugin } = require('webpack');
34
const CopyPlugin = require('copy-webpack-plugin');
45

56
const DIST = path.resolve(__dirname, 'dist');
@@ -31,6 +32,9 @@ module.exports = {
3132
},
3233
},
3334
plugins: [
35+
new ProvidePlugin({
36+
Buffer: ['buffer', 'Buffer'],
37+
}),
3438
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
3539

3640
// for build scripts

0 commit comments

Comments
 (0)