这是angular.json的一部分:
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
我要做的是控制开发环境。例如更改sourceMap
为false
,我不想通过将参数添加到ng build
. 是否有任何相当于production
inside angular.json
which 将指代开发?
还有一些非常重要的事情:在 Angular-CLI 6 中没有ng eject
!那么,如何查看和修改webpack.config.js呢?