Document what is needed to use this library in Webpack
Although we use Browserify, many people use Webpack, so we should document how to use this library with Webpack.
According to #198, you may need:
resolve: {
extensions: ['.ts', '.js'],
fallback: {
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
global: require.resolve('globalthis'),
process: require.resolve('process')
}
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: 'node_modules/webextension-polyfill/dist/browser-polyfill.js'
}
]
}),
new webpack.ProvidePlugin({
global: require.resolve('globalthis')
}),
new webpack.ProvidePlugin({
process: require.resolve('process')
})
]
We should investigate whether this is truly the minimal set of configuration needed or whether we can make this simpler.
@mcmire Since I have fixed instantiating keyring controller, his methods don't work correctly. Ex. in service worker environment Im trying to call createNewVaultAndKeychain(), documentation says that this method creates 1 new random account so under the hood @scure/bip39 lib's methods getting called and this gives another error:
Error's entry point is in /@metamask/browser-passworder/dist/index.js

Any idea or recommendations how can I completely setup keyring controller?