title: Import UMD Javascript Modules into Browser
body: <p>Hi I am doing some research on RxJS.   I am able to use the library simply by referencing it in my browser as such:</p>
  
  <pre><code>&lt;script src="https://unpkg.com/@reactivex/rxjs@5.5.6/dist/global/Rx.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>It imports with the global object namespace variable of 'Rx'.  I can make observables and do all the fun stuff.</p>
  
  <p>Where everything breaks down is when I change the src to point to the latest UMD file like this <code>&lt;script  src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"&gt;&lt;/script&gt;</code> </p>
  
  <p>The import seems to not be working as exported object functions don't seem to exist?</p>
  
  <p>There is a specific function I am trying to use called 'fromEvent' that allows an observable to be created from any DOM event.</p>
  
  <p>I am getting an error when using the latest RxJS 6.2.2 UMD file.</p>
  
  <p>Why is this?  If you look inside the js file at the bottom you can see the export of the function and at the top of the file you see the global namespace called 'rxjs'.</p>
  
  <p>I am not using any loaders like requirejs nor do I have any experimental browser features enabled.  I am not using any 'import' statements.</p>
  
  <p>I am simply trying to reference the global namespace of the script object.  The syntax for the module definition is identical except for Rx vs rxjs.</p>
  
  <p>To replicate the error, simply create an Observable.fromEvent(....  and watch the error console.  </p>
  
  <p>Thanks!</p>