Skip to content

refactor(@angular-devkit/build-angular): add index HTML transformer to application programmatic usage #26667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

clydin
Copy link
Member

@clydin clydin commented Dec 13, 2023

Similar to the dev-server builder, the application builder's programmatic usage can now transform the index HTML that is generated during a build. As is the case for the existing builder JavaScript exports from the package, the new export (buildApplication) is also considered experimental and does not provide the support nor semver guarantees that the builders have when used via angular.json configuration.

The third parameter of the buildApplication function can now be an extensions object with one of the fields being indexHtmlTransformer. This newly introduced field allows adjusting the index HTML content.

Closes #26299

@clydin clydin force-pushed the esbuild/application-extensions branch 2 times, most recently from fc2538d to 01a5896 Compare December 13, 2023 21:10
@clydin clydin marked this pull request as ready for review December 13, 2023 21:11
@clydin clydin added the target: minor This PR is targeted for the next minor release label Dec 13, 2023
@clydin clydin requested a review from alan-agius4 December 13, 2023 21:51
…o application programmatic usage

Similar to the `dev-server` builder, the `application` builder's programmatic usage can now transform
the index HTML that is generated during a build. As is the case for the existing builder JavaScript
exports from the package, the new export (`buildApplication`) is also considered experimental and does
not provide the support nor semver guarantees that the builders have when used via `angular.json` configuration.

The third parameter of the `buildApplication` function can now be an extensions object with one of the fields
being `indexHtmlTransformer`. This newly introduced field allows adjusting the index HTML content.

Closes angular#26299
@alan-agius4 alan-agius4 force-pushed the esbuild/application-extensions branch from 01a5896 to b1cfbc3 Compare December 14, 2023 09:48
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Dec 14, 2023
@alan-agius4 alan-agius4 merged commit 66edac4 into angular:main Dec 14, 2023
@clydin clydin deleted the esbuild/application-extensions branch December 14, 2023 14:44
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose postTransform to all builder APIs to allow index html manipulation
2 participants