[英]Using multiple custom angular builders
I have been using the ng-cli-hooks
custom builder for quite some time to inject the CSP into the index.html file and generating a custom webpack config.很长一段时间以来,我一直在使用
ng-cli-hooks
自定义构建器将 CSP 注入 index.html 文件并生成自定义 webpack 配置。
Now I am looking into @ngx-env/builder
to allow environment variables to be injected on build.现在我正在研究
@ngx-env/builder
以允许在构建时注入环境变量。
But how can I use two or more custom builders?但是我怎样才能使用两个或更多的自定义构建器呢? I guess there is no setting in
angular.json
, where I can simply add more than 1 builder, because my search about this has turned up nothing.我想
angular.json
中没有设置,我可以简单地添加多个构建器,因为我对此的搜索没有任何结果。
But would it be possible to create an own custom builder which then imports functionality from the 2 other builders?但是是否可以创建一个自己的自定义构建器,然后从其他 2 个构建器导入功能?
Thank you!谢谢!
I am still using ng-cli-hooks builder and incorporated the functionality of @ngx-env/builder into my custom webpack config.我仍在使用 ng-cli-hooks builder 并将 @ngx-env/builder 的功能合并到我的自定义 webpack 配置中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.