auth.js:295 Uncaught ReferenceError: global is not defined at Object.5paC code example

Example: auth.js:295 Uncaught ReferenceError: global is not defined at Object.5paC

Erro with Angular 11 with angularfire2 
 Add following code in your starting page e.g. index.html
//var global = global || window;
//var Buffer = Buffer || [];
//var process = process || {
//  env: { DEBUG: undefined },
//  version: []
//};

Ex:
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Client</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <script>
    var global = global || window;
    var Buffer = Buffer || [];
    var process = process || {
      env: { DEBUG: undefined },
      version: []
    };
  </script>
</head>
<body>
  <app-root>
    <div class="loader"></div>
  </app-root>
</body>
</html>

Tags:

Misc Example