title: Angular 2 application hosted in child directory having relative path issues with systemjs after bundling
body: <p>I am creating one single bundle file using sysmtemjs-builder buildStatic method.
  My angular2 application is hosted as sub application on iis.</p>
  
  <p>e.g </p>
  
  <pre><code>http://www.maindomain.com/subapplication/
  </code></pre>
  
  <p>when i create packed js file. All the views and style paths are pointing to main domain</p>
  
  <pre><code>http://www.maindomain.com/app/modules/testcomponent.view.html
  </code></pre>
  
  <p>It should be </p>
  
  <pre><code>http://www.maindomain.com/subapplication/app/modules/testcomponent.view.html
  </code></pre>
  
  <p>I have tried the following things,but none of them is wokring
  Added the <code>&lt;base href="subapplication" /&gt;</code>
  Added module.id to every angular component.
  Tried adding baseURL in my systemjs.config.js file</p>
  
  <p>How can i append my child virtual directory path to views and styles only?</p>
  
  <p>Here is my tsconfig</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "moduleResolution": "node",
      "declaration": false,
      "removeComments": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "sourceMap": true,
      "pretty": true,
      "allowUnreachableCode": false,
      "allowUnusedLabels": false,
      "noImplicitAny": true,
      "noImplicitReturns": true,
      "noImplicitUseStrict": false,
      "noFallthroughCasesInSwitch": true,
      "rootDir": "./app"
    },
    "compileOnSave": false,
    "files": [
      "app/main.ts",
      "typings/index.d.ts"
    ]
  }
  </code></pre>