SystemJS Typescript reference paths on System.import with an application added to the site
<p>I have a url like this: <a href="http://www.foo.com/bar/" rel="nofollow">http://www.foo.com/bar/</a> (Bar is my application name in IIS to access that application under the Default Website). </p>

<p>In MVC and importing files and such as style sheets in my head tag, I can typically use "~/Content/foo.css". </p>

<p>In SystemJS I am trying to import my main.js file which is located in "Scripts/typescript/main.js" but i need it to be in reference of my application name (bar above). </p>

<p>Here's what I have right now: </p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script&gt;
    System.config({
        packages: {
            './Scripts/typescript': {
                format: 'register',
                defaultExtension: 'js'
            }
        }
    });

    System.import('./Scripts/typescript/main.js').then(null, console.error.bind(console));
    &lt;/script&gt;</code></pre>
</div>
</div>
</p>

<p>The problem is, this looks at the root, so it's trying to access www.foo.com/Scripts/typescript/main.js when I really need it to access www.foo.com/bar/Scripts/typescript.main.js. </p>

<p>I don't want to hard code the app name into my URL because it won't work where that app name is different or doesnt exist. </p>

<p>Can someone help me so that it knows how to access the correct path? </p>