saomi
saomi

Reputation: 885

Generate sourcemap files with grunt-ts

Hi I am beggining a a project with typescript and it uses grunt-ts to compile to javascript.

My configs in a file: tsconfig.json are:

{
  "compileOnSave": true,
  "compilerOptions": {
    "target": "es5",
    "noImplicitAny": true,
    "suppressImplicitAnyIndexErrors": true,
    "removeComments": false,
    "module": "amd",
    "resolveJsonModule": true,
    "strict": true,
    "rootDir": "public_html/",
    "outDir": ".tmp/",
    "sourceMap": true
  },
  "include": [
    "public_html/web/js/**/*.ts"
  ],
  "exclude": [
    "node_modules/"
  ]
}

My gruntfile.js it's huge but here it is my task that calls tsconfig.json

grunt.initConfig({
   ...
   ...
   ...
   ts: {
        dev: {
           tsconfig: "./tsconfig.json"
        }
   },
...
});

I am running typescript: version 2.9.2 and grunt-ts version 5.5.1

I have sourceMap defined as true, but when I compile the .map files are not being generated. What I am doing wrong?

UPDATE

I realize now that my .map files are being generated, altough the code it is in one line. :/

However in Chrome does not show any content in .ts files. In firefox it displays an error message

Error while fetching an original source: request failed with status 404 Source URL: http://localhost:3501/public_html/web/js...

Upvotes: 0

Views: 533

Answers (0)

Related Questions