有没有办法查看 Angular 的 webpack 配置?

Is there a way to see Angular's webpack configuration?

我正在试验 @angular-builders/custom-webpack,但有时很难知道需要更改什么,因为我看不到 Angular 创建的原始配置。

我在 angular/angular or the angular/angular-cli 源中找不到 webpack 配置文件(除了一些测试用例)所以我猜它是基于 angular.json.

有没有办法打印/转储这个完整的配置?即使它涉及临时 hack/workaround.

正在使用的版本:

"@angular-builders/custom-webpack": "^9.2.0",
"@angular-devkit/build-angular": "~0.901.13",
"@angular/cli": "^9.1.13"

编辑:如评论中所述,可以找到当前的 webpack 配置 here


在 CLI 的 1.7 版本之前,您可以使用 ng eject(例如,如果您想在较旧的项目中尝试,请参见 this),但现在已被禁用 AFAIK .

我自己没有使用自定义 webpack 配置的经验,但你可能想看看 'ng eject alternatives',比如 this one for example. Or perhaps you can find information on this CLI-issue