Skip to content

Commit

Permalink
Merge pull request #11765 from Uzlopak/optimize-browser-bundle
Browse files Browse the repository at this point in the history
optimize size of browser bundle, use buffer v.5.7.1 package to match buffer package of mongodb in browser bundle
  • Loading branch information
vkarpov15 committed May 5, 2022
2 parents 58d728e + 4be4156 commit c232dd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"babel-loader": "8.2.5",
"benchmark": "2.1.4",
"bluebird": "3.7.2",
"buffer": "6.0.3",
"buffer": "^5.6.0",
"cheerio": "1.0.0-rc.10",
"crypto-browserify": "3.12.0",
"dox": "0.3.1",
Expand Down
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ const webpackConfig = {
}
]
},

resolve: {
alias: {
'bn.js': require.resolve('bn.js')
},
fallback: {
assert: require.resolve('assert-browserify'),
buffer: require.resolve('buffer/'),
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify')
}
Expand Down

0 comments on commit c232dd7

Please sign in to comment.