File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
22const defaultsDeep = require ( 'lodash.defaultsdeep' ) ;
33const path = require ( 'path' ) ;
44const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
5+ const webpack = require ( 'webpack' ) ;
56
67const base = {
78 mode : process . env . NODE_ENV === 'production' ? 'production' : 'development' ,
@@ -11,6 +12,11 @@ const base = {
1112 libraryTarget : 'umd' ,
1213 filename : '[name].js'
1314 } ,
15+ resolve : {
16+ fallback : {
17+ Buffer : require . resolve ( 'buffer/' )
18+ }
19+ } ,
1420 module : {
1521 rules : [ {
1622 test : / \. j s $ / ,
@@ -32,7 +38,11 @@ const base = {
3238 } )
3339 ]
3440 } ,
35- plugins : [ ]
41+ plugins : [
42+ new webpack . ProvidePlugin ( {
43+ Buffer : [ 'buffer' , 'Buffer' ]
44+ } )
45+ ]
3646} ;
3747
3848module . exports = [
You can’t perform that action at this time.
0 commit comments