在编译ionic项目的时候出现:Error:The "tsconfig.json" file must have compilerOptions.sourceMap set to true.

  如下:

The "tsconfig.json" file must have compilerOptions.sourceMap set to true

  解决此问题首先我们要弄清楚这个文件的作用:tsconfig.json文件用来指定编译项目所需的根文件和编译器选项。

The "tsconfig.json" file must have compilerOptions.sourceMap set to true

  详细的编译选项参见:http://www.typescriptlang.org/docs/handbook/compiler-options.html

 

  解决办法就是修改tsconfig.json:

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

 

相关文章:

  • 2022-12-23
  • 2021-11-03
  • 2021-11-14
  • 2022-12-23
  • 2021-07-03
  • 2021-09-04
  • 2021-11-25
  • 2021-07-27
猜你喜欢
  • 2021-11-24
  • 2021-11-06
  • 2021-12-15
  • 2022-02-24
  • 2021-12-05
相关资源
相似解决方案