这是我的tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"outDir": "wwwroot/app/source/"
},
"exclude": [
"node_modules",
"bower_components",
"wwwroot",
"typings/main",
"typings/main.d.ts"
]
}如您所见,sourceMap选项被设置为true,这是因为我需要它来调试我的应用程序。
但是,我只需要在调试模式下使用它,以便在运行发布模式下吞咽脚本时将其设置为false。
有没有办法强迫--sourceMap=fase
发布于 2016-06-19 10:10:43
你能通过你的吞咽任务代码的例子吗?吞咽,吞咽?
我建议您使用插件吞咽式打字,在gulp (默认的开发任务)中,使用他与插件吞咽源图。在gulp (或其他任务)中,您只需跳过管道,因此在dist版本中,您将没有源代码地图。
或者您可以简单地使用两个不同的tsconfig文件- dev / prod。并像使用-tsconfigjson一样使用它们
https://stackoverflow.com/questions/37905897
复制相似问题