Maximilian Friedmann
Maximilian Friedmann

Reputation: 399

sourcemap references wrong line, most often last line of source file

I am using grunt-ts (v5.3.0beta.2, tsc v1.7.3) to compile my typscript files to javascript with inlineSource + inlineSourceMaps for debugging

My grunt configuration looks like this :

grunt.initConfig({
  ts: {
    project: {
      src: ["app/client/**/*.ts"],
      options: {
        removeComments: false,
        failOnTypeErrors: true,
        inlineSourceMap: true,
        inlineSources: true
      },
      outDir: "tmp/built/app"
    }
  }
});

Now chrome picks up the sourcemaps but the line number is always wrong, most of the times its just the last line in the code.

In this example its referencing line number 51, but it should be line number 21: enter image description here

Upvotes: 4

Views: 814

Answers (0)

Related Questions