Skip to content

Commit 12d76fc

Browse files
refactor: moved buffer plugin to shared config
1 parent e8a413a commit 12d76fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.cjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const path = require('path');
22

33
const merge = require('lodash.merge');
44
const nodeExternals = require('webpack-node-externals');
5+
const webpack = require('webpack');
56

67
const DEFAULT_CHUNK_FILENAME = 'chunks/[name].[chunkhash].js';
78

@@ -184,7 +185,11 @@ class ScratchWebpackConfigBuilder {
184185
],
185186

186187
},
187-
plugins: []
188+
plugins: [
189+
new webpack.ProvidePlugin({
190+
Buffer: ['buffer', 'Buffer']
191+
})
192+
]
188193
};
189194
}
190195

0 commit comments

Comments
 (0)