title: Buffer is not defined error after migrating to Angular 7
body: <p>I am migrating an Angular 5 app to version 7 and have hit an issue with some existing code that attempts to use a Buffer global.</p>
  
  <p>The code in question comes from the <a href="https://git.coolaj86.com/coolaj86/btoa.js/src/branch/master/index.js" rel="nofollow noreferrer">btoa</a> library which makes use of the global.</p>
  
  <p>In my migrated Angular 7 app, I am getting <code>ReferenceError: Buffer is not defined</code> and is being thrown when attempting to call the btoa function exported from this library.</p>
  
  <p>This however works all fine in my Angular 5 app.</p>
  
  <p>What could be going on here? I am assuming it has to do with a change in the angular CLI and maybe the way webpack is bundling somehow?</p>
  
  <p>I saw a similar question <a href="https://stackoverflow.com/questions/50371593/angular-6-uncaught-referenceerror-buffer-is-not-defined">here</a> talking about related issues, and one suggestion was to install the buffer package, which I tried, but it made no difference for my situation.</p>
  
  <p>Thanks</p>