MetaMask / extension-provider

A module for allowing a WebExtension to access the web3 provider from an installed MetaMask instance
MIT License
68 stars 28 forks source link

Webpack support #23

Open mcanvar opened 3 years ago

mcanvar commented 3 years ago

Hi mates,

Do you consider supporting Webpack?

Thanks for supporting the browser extensions.

Tobeyy1 commented 2 years ago

Hey guys, any update on this?

0xETHBAE commented 1 year ago

+1 :)

jhonnyV-V commented 5 months ago

well, it can be used on webpack, but you will need to do some config, I think the version that is being maintained is in the provider,

npm install -D buffer process stream-browserify

and in your webpack config

resolve: {
    fallback: {
      stream: require.resolve('stream-browserify'),
      buffer: require.resolve('buffer/'),
    },
    alias: {
      process: 'process/browser',
    },
  },
  plugins: [
    new webpack.ProvidePlugin({
      Buffer: ['buffer', 'Buffer'],
    }),
  ],