title: How to bundle typescript files to single js file using Parcel Bundler?
body: <p>I am using a very basic setup to test the <a href="https://parceljs.org/getting_started.html" rel="nofollow noreferrer">Parcel Bundler</a>, but I'm running into errors when trying to bundle all my Typescript files into one JS file.</p>
  <p><strong>tsconfig.json</strong></p>
  <pre><code>{
      &quot;compilerOptions&quot;: {
          &quot;sourceMap&quot;: true,
          &quot;strict&quot;: true,
          &quot;noImplicitReturns&quot;: true,
          &quot;noImplicitAny&quot;: true,
          &quot;outFile&quot; : &quot;./dist/bundle.js&quot;,
          &quot;module&quot;: &quot;CommonJS&quot;,
          &quot;strictPropertyInitialization&quot;: false,
          &quot;moduleResolution&quot;: &quot;node&quot;,
          &quot;target&quot;: &quot;es5&quot;,
          &quot;allowJs&quot;: true,
      },
      &quot;include&quot;: [
          &quot;./src/**/*&quot;
      ]
  }
  </code></pre>
  <blockquote>
  <p>Error: Only 'amd' and 'system' modules are supported alongside --outFile</p>
  </blockquote>
  <p>But when I leave out <code>outFile : &quot;./dist/bundle.js</code>, then all Typescript files get compiled to separate <code>.js</code> files</p>
  <p>Changing the module setting to <code>system</code> or <code>amd</code> like the error suggests makes no sense. I don't use SystemJS or AMD, so these will generate errors in the browser:</p>
  <blockquote>
  <p>ReferenceError: Can't find variable: System</p>
  <p>TypeError: undefined is not a function (AMD)</p>
  </blockquote>
  <p>How can I tell Parcel to bundle TS files into one JS file?</p>