title: Uncaught ReferenceError: Buffer is not defined
body: <p>Our application kept showing the error in the title. The problem is very likely related to Webpack 5 polyfill and after going through a couple of solutions:</p>
  <ol>
  <li>Setting fallback + install with npm</li>
  </ol>
  <pre><code>fallback: {
    &quot;stream&quot;: require.resolve(&quot;stream-browserify&quot;),
    &quot;buffer&quot;: require.resolve(&quot;buffer/&quot;)
  }
  </code></pre>
  <ol start="2">
  <li>Setting alias</li>
  </ol>
  <pre><code>alias: {
    &quot;buffer&quot;: &quot;buffer&quot;,
    &quot;stream&quot;: &quot;stream-browserify&quot;
  }
  </code></pre>
  <p>We are still seeing the dreadful error:</p>
  <pre><code>rfc6979.js:3 Uncaught ReferenceError: Buffer is not defined
      at Object.4142 (rfc6979.js:3)
      at r (bootstrap:19)
      at Object.5892 (js.js:4)
      at r (bootstrap:19)
      at Object.4090 (bip32.js:5)
      at r (bootstrap:19)
      at Object.7786 (index.js:3)
      at r (bootstrap:19)
      at Object.1649 (MnemonicKey.js:50)
      at r (bootstrap:19)
  </code></pre>
  <p>Our setup is vanilla NodeJS + TypeScript + Webpack for multi-target: node + browser. Any help would be great!</p>