Skip to content

Commit

Permalink
Merge pull request #183 from nop33/fix-readme
Browse files Browse the repository at this point in the history
Fix docs regarding ignoring wordlists in webpack
  • Loading branch information
junderw authored Apr 27, 2022
2 parents 172b67a + 52580da commit d527196
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ $ browserify -r bip39 -s bip39 \

This will create a bundle that only contains the chinese_simplified wordlist, and it will be the default wordlist for all calls without explicit wordlists.

You can also do this in Webpack using the `IgnorePlugin`. Here is an example of excluding all non-English wordlists
You can also do this in Webpack 5 using the `IgnorePlugin`. Here is an example of excluding all non-English wordlists

```javascript
...
plugins: [
new webpack.IgnorePlugin(/^\.\/wordlists\/(?!english)/, /bip39\/src$/),
new webpack.IgnorePlugin({
checkResource(resource) {
return /.*\/wordlists\/(?!english).*\.json/.test(resource)
}
}),
],
...
```
Expand Down

0 comments on commit d527196

Please sign in to comment.