Skip to content

Commit ac67772

Browse files
cyrilletuzihansl
authored andcommitted
fix(@angular/pwa): correct paths for manifest and icons
1 parent 33bc477 commit ac67772

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/angular/pwa/pwa/files/assets/manifest.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@
44
"theme_color": "#1976d2",
55
"background_color": "#fafafa",
66
"display": "browser",
7-
"Scope": "/",
7+
"scope": "/",
88
"start_url": "/",
99
"icons": [
1010
{
11-
"src": "images/icons/icon-72x72.png",
11+
"src": "/assets/icons/icon-72x72.png",
1212
"sizes": "72x72",
1313
"type": "image/png"
1414
},
1515
{
16-
"src": "images/icons/icon-96x96.png",
16+
"src": "/assets/icons/icon-96x96.png",
1717
"sizes": "96x96",
1818
"type": "image/png"
1919
},
2020
{
21-
"src": "images/icons/icon-128x128.png",
21+
"src": "/assets/icons/icon-128x128.png",
2222
"sizes": "128x128",
2323
"type": "image/png"
2424
},
2525
{
26-
"src": "images/icons/icon-144x144.png",
26+
"src": "/assets/icons/icon-144x144.png",
2727
"sizes": "144x144",
2828
"type": "image/png"
2929
},
3030
{
31-
"src": "images/icons/icon-152x152.png",
31+
"src": "/assets/icons/icon-152x152.png",
3232
"sizes": "152x152",
3333
"type": "image/png"
3434
},
3535
{
36-
"src": "images/icons/icon-192x192.png",
36+
"src": "/assets/icons/icon-192x192.png",
3737
"sizes": "192x192",
3838
"type": "image/png"
3939
},
4040
{
41-
"src": "images/icons/icon-384x384.png",
41+
"src": "/assets/icons/icon-384x384.png",
4242
"sizes": "384x384",
4343
"type": "image/png"
4444
},
4545
{
46-
"src": "images/icons/icon-512x512.png",
46+
"src": "/assets/icons/icon-512x512.png",
4747
"sizes": "512x512",
4848
"type": "image/png"
4949
}

packages/schematics/angular/service-worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function updateIndexFile(options: ServiceWorkerOptions): Rule {
189189

190190
const indent = getIndent(closingHeadTagLine) + ' ';
191191
const itemsToAdd = [
192-
'<link rel="manifest" href="./manifest.json">',
192+
'<link rel="manifest" href="assets/manifest.json">',
193193
'<meta name="Description" content="Angular Application">',
194194
'<meta name="theme-color" content="#FFFFFF">',
195195
];

packages/schematics/angular/service-worker/index_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('Service Worker Schematic', () => {
101101
const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree);
102102
const content = tree.readContent('projects/bar/src/index.html');
103103

104-
expect(content).toMatch(/<link rel="manifest" href="\.\/manifest.json">/);
104+
expect(content).toMatch(/<link rel="manifest" href="assets\/manifest.json">/);
105105
expect(content).toMatch(/<meta name="Description" content="Angular Application">/);
106106
expect(content).toMatch(/<meta name="theme-color" content="#FFFFFF">/);
107107
});

0 commit comments

Comments
 (0)