title: RequireJs serving both .ts and .js file to browser
body: <p>Following are the files are present in my ASP.NET Core Project.</p>
  
  <p><code>greet.ts</code></p>
  
  <pre><code>export class WelcomMesssage {
  name: string;
  constructor(name: string) {
      this.name = name;
  }
  say(): void {
      console.log("Welcome " + this.name);
  }
  }
  </code></pre>
  
  <p><code>GreetExample.ts</code></p>
  
  <pre><code>import * as greet from "./greet";
  export function Test(): void {
      let g = new greet.WelcomMesssage("Bhavesh");
      g.say();
  }
  </code></pre>
  
  <p><code>main.ts</code></p>
  
  <pre><code>require.config({
       baseUrl:'Scripts'
  });
  require(['GreetExample'], (GreetExample) =&gt; { GreetExample.Test() }); 
  </code></pre>
  
  <p><code>index.html</code> File</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;index&lt;/title&gt;
      &lt;script data-main="Scripts/main" src="lib/requirejs/require.js" 
      type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I looked into sources in Chrome debug tools, my web app was serving both .ts and .js files.</p>
  
  <p><a href="https://i.stack.imgur.com/auoCC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/auoCC.png" alt="enter image description here"></a></p>
  
  <p>Why is it serving both .ts and .js file? I am minifying all the javascript generated by .ts files and putting them all in <code>wwwroot/build</code> folder. How do I use this minified files with requirejs?</p>