Closed YanDevDe closed 3 years ago
Could you try with an old version of webpack?
Maybe look on their repo to see which version was latests when I merged that PR. Try that version, and if it works, then try asking webpack devs.
According to the webpack website, perhaps it needs to be this instead?
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/(?!english)/,
contextRegExp: /bip39\/src\/wordlists$/
})
I ran into this issue today, and decided to log the arguments
passed to checkResource
(some results excluded):
[Arguments] {
'0': './_wordlists',
'1': 'D:\\...\\node_modules\\bip39\\src'
}
[Arguments] {
'0': './wordlists/chinese_simplified.json',
'1': 'D:\\...\\node_modules\\bip39\\src'
}
[Arguments] {
'0': './wordlists/english.json',
'1': 'D:\\...\\node_modules\\bip39\\src'
}
What I didn't expect was to see the wordlists substring in the first argument, rather than the second. As such, I was able to apply the following change to the config file to exclude non-English lists:
module.exports = {
plugins: [
new webpack.IgnorePlugin(/^\.\/wordlists\/(?!english)/)
]
}
If you're on Windows, you should use backslash (\
) for the context :
new webpack.IgnorePlugin(/^\.\/wordlists\/(?!english)/, /bip39\\src$/)
^
Hello everyone,
I tried the following method:
new webpack.IgnorePlugin(/^\.\/wordlists\/(?!english)/, /bip39\/src$/)
But for some reason this is not working and I'm still able to get wordlist from other languages. I also tried the old method back in times from #118 which is obviously not working too.
Ignoring other package is working fine at my side, as example for "moment"
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
Was wondering if you could reproduce the issue too?
I'm using Webpack 4.41.5