Ionic 2 typescript source map not created

I am trying to debug an Ionic 2 application . And I want to know how to enable souceMap for each typescript file that maps to javascript .

But when I open the dev tools in Chrome, there is no suceMap file .

Chrome-dev-tool-source-img

In addition, I included the file in tsconfig.json . This is my tsconfig.json file "sourceMap":true

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5",
    "types": [
      "jasmine"
    ]
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

After that, I tried to change ionic.config.json so that sourcemaps does not work for ionic 2 . But that also did not work for me.

Does anyone know what is wrong?

+4
2

.

.map . , . issue.

"config":{

     "ionic_source_map":"source_map"
}

package.json. .ts .

+5

-

config: {
    ionic_bundler: "webpack",
    ionic_source_map_type: "#inline-source-map"
  }
+1

Source: https://habr.com/ru/post/1661534/


All Articles