Search code examples
angularangular-clibabeljsangular7angular-schematics

Angular 7 - Add custom babel plugin to build chain


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.


Solution

  • 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