Skip to content

Commit

Permalink
Fix docs regarding ignoring wordlists in webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
nop33 committed Apr 27, 2022
1 parent 172b67a commit 52580da
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 52580da

Please sign in to comment.