Angular 7 - Add custom babel plugin to build chain

Viewed 1704

I want to add the optional-chaining babel plugin to my Angular 7 build but can't find any documentation on if it's possible to add a .babelrc or schematic to my current project to amend/add custom plugins.

2 Answers

Unfortunately it's not currently possible.

You can find the angular-cli repo conversation over here which describes the community attitude and possible solutions.

UPD: There is a tool ngx-build-plus which could partially fix your problem

Angular officially doesn't support Babel, so you would need to wire up it yourself with ngx-build-plus or completely exiting the cli.

Related