我正在开发一个Angular2应用程序。我完成了doucmentation并实现了AOT和汇总。我在应用程序中有一些非es6模块。汇总后,我在网络包的帮助下捆绑了js,以取代'要求'带有所需库代码的语句。我已经在每一步生成了sourceMap。但是,当控制台中出现错误时,它不会反映正确的行。以下是我的aot,汇总和webpack配置。 ' sourceMap'选项设置为' true'在每个配置中。请指教。
tsconfig.aot.js
Enum

rollup.ts
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"allowUnreachableCode": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true
},
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit" : true
},
"compileOnSave": false,
"files": [
"scripts/app.module.ts",
"scripts/main.ts"
],
"exclude": [
"node_modules",
"dist"
]
}

最后是Webpack
插件:[
export default {
entry: 'scripts/main.js',
dest: 'build/app.js', // output a single application bundle
sourceMap: true,
format: 'iife',
context: 'this',
plugins: [
nodeResolve(
{
jsnext: true,
module: true,
}
),
commonjs({
include: 'node_modules/**/**',
}) ,
]
}
],