Skip to content

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

Closed

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

Activity

  1. muuvmuuv commented on Nov 9, 2023

    @muuvmuuv
    Author

    @angular-devkit__build-angular@17.0.0.patch

    Here is a patch file that works.

  2. angular-robot commented on Nov 10, 2023

    @angular-robot
    Contributor

    This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

    You can find more details about the feature request process in our documentation.

  3. arnabk commented on Dec 11, 2023

    @arnabk

    👍

  4. added
    feature: under considerationFeature request for which voting has completed and the request is now under consideration
    and removed
    feature: votes requiredFeature request which is currently still in the voting phase
    on Dec 12, 2023
  5. added 3 commits that reference this issue on Dec 13, 2023
    f2d29cc
    fc2538d
    01a5896
  6. added a commit that references this issue on Dec 14, 2023
    b1cfbc3
  7. added a commit that references this issue on Dec 14, 2023
    66edac4
  8. angular-automatic-lock-bot commented on Jan 14, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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