title: From Typescript to Javascript => required is not defined in chrome browser
body: <p>From:</p>
  
  <pre><code>import {Component} from 'angular2/core';
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>var core_1 = require('angular2/core');
  </code></pre>
  
  <p>I get in my browser some errors:</p>
  
  <pre><code>required is not defined
  </code></pre>
  
  <p>Why do I have to include requireJS as a runtime dependency? The angular 2 5 min tutorial does not anywhere include that library!</p>
  
  <p>Thats annoying!</p>
  
  <p><a href="https://angular.io/guide/quickstart" rel="nofollow noreferrer">https://angular.io/guide/quickstart</a></p>
  
  <p>When I do:</p>
  
  <pre><code>    &lt;script src="~/lib/require.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I still get the error because of my compiled javascript:</p>
  
  <p><a href="https://i.stack.imgur.com/Dotac.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dotac.png" alt="enter image description here"></a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>These are the includes script in my header-tag:</p>
  
  <pre><code>  &lt;script src="~/lib/es6-shim.js"&gt;&lt;/script&gt;
      &lt;script src="~/lib/es6-promise.js"&gt;&lt;/script&gt;
  
      &lt;script src="~/lib/system-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="~/lib/angular2-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="~/lib/system.js"&gt;&lt;/script&gt;
  
      &lt;script src="~/lib/Rx.js"&gt;&lt;/script&gt;
      &lt;script src="~/lib/angular2.js"&gt;&lt;/script&gt;
  
      &lt;script src="~/lib/http.dev.js"&gt;&lt;/script&gt;
      &lt;script src="~/lib/router.dev.js"&gt;&lt;/script&gt;
  
      &lt;script asp-src-include="~/app/**/*.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;
              System.config({
                  packages: {
                      app: {
                          format: 'register',
                          defaultExtension: 'js'
                      }
                  }
              });
              System.import('app/main')
                    .then(null, console.error.bind(console));
      &lt;/script&gt;
  </code></pre>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p><a href="https://i.stack.imgur.com/EEC6Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EEC6Z.png" alt="enter image description here"></a></p>