title: How to bundle Angular 2 app with systemjs and systemjs-builder?
body: <p>I'm developing an app and I need to increase the angular 2 performance loading all the scripts. The problem is this error:</p>
  
  <p><a href="https://i.stack.imgur.com/vP6Gk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vP6Gk.png" alt="enter image description here"></a></p>
  
  <p>I'm using gulp + systemjs + systemjs-builder. Here is my files:</p>
  
  <p><strong>[gulpfile]</strong></p>
  
  <pre><code>gulp.task('bundle', function () {
      var builder = new SystemBuilder('./', './wwwroot/lib/js/systemjs.config.js');
      return builder.buildStatic('wwwroot/lib/spa/main.js', 'wwwroot/lib/js/bundle.min.js', {
          minify: true,
          mangle: true,
          rollup: true,
          runtime: false
      });
  });
  </code></pre>
  
  <p><strong>[systemjs.config]</strong></p>
  
  <pre><code>var config = {
          //use typescript for compilation
          transpiler: 'typescript',
          transpilerRuntime: false,
          //typescript compiler options
          typescriptOptions: {
              emitDecoratorMetadata: true
          },
          map: map,
          packages: packages,
          defaultJSExtensions: true
      };
  </code></pre>
  
  <p>As you can see it is added <strong>.js</strong> to transpiler as result of <strong>defaultJSExtensions: true</strong>. Do I need to do something different? (I really need this property equals to true, because I have a lot of paths without <strong>.js</strong>).</p>
  
  <p>Thanks in advance =)</p>