Skip to content

Expose postTransform to all builder APIs to allow index html manipulation #26299

Closed
@muuvmuuv

Description

@muuvmuuv

Command

build, serve

Description

We are dynamically generating our index.html through just-jeb/angular-builders because we have preconnect's set based on env vars and other stuff that cannot be done through JS.

Now we want to move to the Angular 17 application builders. But we cannot modify the index.html there. We already tried programmatically but buildApplication does not expose the transform plugin option from IndexHtmlGenerator.

Describe the solution you'd like

The IndexHtmlGenerator already has an postTransformPlugin which only requires the option postTransform to be passed to it from the builders.

If we would pass this option to executePostBundleSteps and then to generateIndexHtml we can then modify the index.html.

Describe alternatives you've considered

An angular.json property to a file that exports a default function that is passed to postTransform

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions