Repository navigation
Conversation
…object
The application and browser builders accept the `index` option either as a string or as
an `{ input, output }` object. `ng add @angular/pwa` only collects string values when
looking for index files to update, so a project using the object form gets no
`<link rel="manifest">` tag. The failure is silent: when the object points at a custom
file such as `src/app-index.html`, no index file is updated at all, and the installed
application never loads the web app manifest.
Collect the `input` path of an object-form `index` alongside the string form, for both
the target options and each configuration.
The new spec fails without the fix: with
`"index": { "input": "projects/bar/src/app-index.html", "output": "index.html" }`,
the schematic left `app-index.html` without the manifest link.
There was a problem hiding this comment.
Code Review
This pull request updates the Angular PWA schematic to support index files specified as an object containing input and output properties, ensuring the manifest link is correctly added to the source file referenced by input. It refactors the index file collection logic into a helper function collectIndexFile and adds a corresponding unit test. There are no review comments, so I have no feedback to provide.
alan-agius4
approved these changes
Nov 9, 2026
Collaborator
|
Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The application and browser builders accept the
indexoption either as a string or as an{ input, output }object.ng add @angular/pwaonly collects string values when looking for index files to update, so a project using the object form gets no<link rel="manifest">tag. The failure is silent: when the object points at a custom file such assrc/app-index.html, no index file is updated at all, and the installed application never loads the web app manifest.Collect the
inputpath of an object-formindexalongside the string form, for both the target options and each configuration.The new spec fails without the fix: with
"index": { "input": "projects/bar/src/app-index.html", "output": "index.html" }, the schematic leftapp-index.htmlwithout the manifest link.