title: How to configure to run typescript output in browser?
body: <p>I have a TypeScript project with a few real TypeScript classes, not just functions. I have 1 file per class. There are classes that depend on other classes. I can compile these whole TypeScript to JavaScript with <code>tsc</code>. I can also run locally the JavaScript output with Node. It runs fine. Actually I run a small test class. I don't use any third party library.</p>
  
  <p>I want that a browser can run the generated JavaScript. So I tried to include the whole JavaScript output in my HTML website.
  But the JavaScript does not run in a browser. I just tried to create an instance from one of the generated JavaScript class. I also copied the needed require.js file to my HTML project.</p>
  
  <p>My question is: How can I configure <code>tsc</code> and <code>requirejs</code> that a browser can run my generated JavaScript?</p>
  
  <p>My <code>tsc</code> generated require calls with relative paths. It is not a mystery that this does not work in a browser, but I don't know which variant would work. I am a bit upset, because I read so many tutorials and tried so many combinations and I am still not wiser. Many tutorials mention <code>webpack</code>, <code>gulp</code>, <code>baseUrl</code> and such things without showing an example that would run in a browser.</p>
  
  <p>My <code>tsc</code> config is:</p>
  
  <pre><code>{
    "compilerOptions":
    {
      "module": "none",
      "target": "ES2018",
      "removeComments": true,
      "rootDir": "Source",
      "outDir": "Build"
    },
  
    "exclude": [
        "node_modules"
    ]
  }
  </code></pre>