这是我这边的一个错误。我使用 npm start 进行不同的配置。我错过了在该特定配置中添加 sourceMap=true 。
ng serve --configuration custom
"custom": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
],
"outputHashing": "all",
"sourceMap": true
}