Skip to content

Commit

Permalink
Removed extra wordlists from the dist files (#2058, #2077).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Oct 16, 2021
1 parent b7e61bd commit cb43a99
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/wordlists/package.json
Expand Up @@ -3,15 +3,15 @@
"./lib/wordlists": "./lib/wordlists.js"
},
"_ethers.alias": {
"dead-wordlists.js": "dead-browser-wordlists.js"
"wordlists.js": "browser-wordlists.js"
},
"author": "Richard Moore <me@ricmoo.com>",
"dependencies": {
"@ethersproject/bytes": "^5.4.0",
"@ethersproject/hash": "^5.4.0",
"@ethersproject/logger": "^5.4.0",
"@ethersproject/properties": "^5.4.0",
"@ethersproject/strings": "^5.4.0"
"@ethersproject/bytes": "^5.5.0",
"@ethersproject/hash": "^5.5.0",
"@ethersproject/logger": "^5.5.0",
"@ethersproject/properties": "^5.5.0",
"@ethersproject/strings": "^5.5.0"
},
"description": "Word lists for BIP39 wallets.",
"ethereum": "donations.ethers.eth",
Expand Down Expand Up @@ -45,7 +45,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": false,
"tarballHash": "0xed146d30213e5f1c9faca4285d27254e3143759f02793b80a5ebc0f19703ea11",
"tarballHash": "0x50636816baaed99154f0458e399e704ed58bebaa67a480ab3edebb900ee57965",
"types": "./lib/index.d.ts",
"version": "5.4.0"
"version": "5.5.0"
}
12 changes: 12 additions & 0 deletions rollup-dist.config.js
Expand Up @@ -31,6 +31,17 @@ function addUtilsReplace(plugins) {
return plugins;
}

function addLangReplace(plugins) {

plugins.push(replace({
'require("./wordlists")': 'require("./browser-wordlists")/*RicMoo:ethers:require(wordlists)*/',
include: "**/wordlists/lib/index.js",
delimiters: [ '', '' ]
}));

return plugins;
}

function addEllipticReplace(plugins) {

// Replace the package.json in elliptic
Expand Down Expand Up @@ -70,6 +81,7 @@ function getUmdConfig() {

addUtilsReplace(plugins);
addEllipticReplace(plugins);
addLangReplace(plugins);

plugins.push(resolveNode({
mainFields: [ "browser", "main" ]
Expand Down

0 comments on commit cb43a99

Please sign in to comment.