From 5cf326c2a956f29d9941db9b6cf0c729ea5022ac Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Mon, 8 Apr 2019 03:15:14 +0900 Subject: [PATCH 1/2] Add instructions for webpack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sharing this for anybody else that needs it 👍 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 168c0cb..bfbcbbe 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@ $ 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 + + ```javascript + new webpack.IgnorePlugin(/^\.\/(?!english)/, /bip39\/src\/wordlists$/), + ``` This is how it will look in the browser console. From 26c0f1b4f8c88a09e8b94522f60697d1491cd2fc Mon Sep 17 00:00:00 2001 From: Jonathan Underwood Date: Tue, 9 Apr 2019 18:42:27 +0900 Subject: [PATCH 2/2] Add plugins array to show where it goes --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfbcbbe..abf15ab 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,11 @@ $ browserify -r bip39 -s bip39 \ You can also do this in Webpack using the `IgnorePlugin`. Here is an example of excluding all non-English wordlists ```javascript - new webpack.IgnorePlugin(/^\.\/(?!english)/, /bip39\/src\/wordlists$/), + ... + plugins: [ + new webpack.IgnorePlugin(/^\.\/(?!english)/, /bip39\/src\/wordlists$/), + ], + ... ``` This is how it will look in the browser console.