-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Expose postTransform to all builder APIs to allow index html manipulation #26299
Comments
Here is a patch file that works. |
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. |
👍 |
…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
…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
…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
…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
…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 #26299
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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
The text was updated successfully, but these errors were encountered: