Skip to content

Commit

Permalink
lib: properly exclude "buffer" from Webpack builds
Browse files Browse the repository at this point in the history
The technique of `require('buf' + 'fer')` doesn't actually fool Webpack.

The proper way to exclued a module is with the following `package.json`
field:

https://github.com/defunctzombie/package-browser-field-spec
  • Loading branch information
swansontec authored and indutny committed Aug 7, 2017
1 parent 163ca3a commit 7e6f9d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -25,6 +25,9 @@
"url": "https://github.com/indutny/bn.js/issues"
},
"homepage": "https://github.com/indutny/bn.js",
"browser": {
"buffer": false
},
"devDependencies": {
"istanbul": "^0.3.5",
"mocha": "^2.1.0",
Expand Down

0 comments on commit 7e6f9d2

Please sign in to comment.