0

Hello people of the internet,

I'm writing typescript-code and compiling it to javascript. I activated the --inlineSourceMap and --inlineSources flags. The into the javascript files embedded base64-strings looks decoded like this:

{
    "version":3,
    "file":"portal.service.js",
    "sourceRoot":"",
    "sources":[
        "portal.service.ts"
    ],
    "names":[

    ],
    "mappings":";;;;;;;;;;AAAA,sCA ... ,0DAAuB",
    "sourcesContent":[
        "import {Injectable} from '@angular/core'; ..."
    ]
}

Problem The sources-tab in Chrome devtools points to portal.service.ts, which does NOT exist on the server, instead of using the inlined sources content.

Any ideas where/what the problem is?

enter image description here

phip1611
  • 5,460
  • 4
  • 30
  • 57

1 Answers1

0

I think I found the bug! We're using SystemJS Builder to bundle our application. SystemJS Builder seems to follow the map-uri's in the JS-files and therefore the map-file for the bundle points to the original ts-file instead the compiled javascript-files.

phip1611
  • 5,460
  • 4
  • 30
  • 57