URL
https://ionicframework.com/docs/angular/pwa
Issue Description
The guide's only setup step is ng add @angular/pwa, which was accurate before Angular 18 but is no longer sufficient for a project created with ionic start.
Since Angular 18 the pwa schematic writes manifest.webmanifest and the icons to public/ and no longer adds an entry to angular.json. The Ionic starter's angular.json has no public asset glob, so those files are never copied into www/. On a host with a SPA rewrite the 404 is served as index.html and the browser reports Manifest: Line: 1, column: 1, Syntax error.
The page should tell readers to add the public glob to the assets array after running the schematic:
{ "glob": "**/*", "input": "public" }
Note there is deliberately no output key, so the files land at the web root and match the <link rel="manifest" href="manifest.webmanifest"> the schematic injects into index.html.
The ngsw-config.json sample on the page is also stale relative to what Angular 18+ generates and worth refreshing at the same time.
Reported in ionic-team/starters#1888, which covers the starter-side fix.
URL
https://ionicframework.com/docs/angular/pwa
Issue Description
The guide's only setup step is
ng add @angular/pwa, which was accurate before Angular 18 but is no longer sufficient for a project created withionic start.Since Angular 18 the pwa schematic writes
manifest.webmanifestand the icons topublic/and no longer adds an entry toangular.json. The Ionic starter'sangular.jsonhas nopublicasset glob, so those files are never copied intowww/. On a host with a SPA rewrite the 404 is served as index.html and the browser reportsManifest: Line: 1, column: 1, Syntax error.The page should tell readers to add the public glob to the
assetsarray after running the schematic:Note there is deliberately no
outputkey, so the files land at the web root and match the<link rel="manifest" href="manifest.webmanifest">the schematic injects into index.html.The
ngsw-config.jsonsample on the page is also stale relative to what Angular 18+ generates and worth refreshing at the same time.Reported in ionic-team/starters#1888, which covers the starter-side fix.