title: Angular2: ng2-file-upload : cannot load it correctly using SystemJS
body: <p>I'm using systemJS to manage my packages so I've added those lines to my systemjs's configuration file :</p>
  
  <pre><code>{
    map: { 'ng2-file-upload': 'node_modules/ng2-file-upload' },
    packages: {
      'ng2-file-upload': {
          main: './ng2-file-upload/ng2-file-upload.js', // also tried with './ng2-file-upload.js'
          defaultExtension: 'js'
      },
    }
  }
  </code></pre>
  
  <p>I import <strong>ng2-file-upload</strong> via <code>import { FileDrop, FileUploader } from 'ng2-file-upload';</code>.</p>
  
  <p>But importing causes my application "craches"  : my typscript compiler seems works well (I can see logs due to other code) but the modifications are not transpiled anymore so I can't run anything. I don't have any error logs in connection with <strong>ng2-file-upload</strong> (except a lot of <code>Duplicate identifiers</code>).</p>
  
  <p>Any idea ?</p>
  
  <p><strong>EDIT:</strong> I've extracted this package from <code>node_modules</code> to a folder that is near my app (<code>vendor</code>) and I've used a relative path to import <code>FileDrop</code> and <code>FileUploader</code> but systemjs failed to imports :</p>
  
  <p><code>Error: SyntaxError: Unexpected token &lt;(…)</code></p>
  
  <p><strong>EDIT 2:</strong> Here is some details.
  My application is under a <code>public</code> which contains 2 sub-folders : <code>src</code> and <code>build</code>. I write ts code inside <code>src</code> (this is obvious) and my tsc saves transpiled files to <code>build</code>. At the moment, I don't bundle my files so the hierarchy inside <code>build</code> is the same as the <code>src</code> one.</p>
  
  <p>But something weird happens only with <em>ng2-file-upload</em> : during transpiling, tsc add a <code>node_modules/ng2-file-upload</code> folder inside <code>build</code>. Here is the trees :</p>
  
  <pre><code>public
  |-- build
  |    |-- core
  |    |-- modules
  |    |-- styles
  |    |-- node_modules
  |    |    |-- ng2-file-upload
  +-- src
      |-- core
      |-- modules
      |-- styes
  </code></pre>
  
  <p>I don't know why TSC transpile this package. Of course, <code>node_modules</code> are excluded in my <code>tsconfig.ts</code>.</p>