Skip to content

Commit 64d42e3

Browse files
authored
Merge pull request #57 from maifeeulasad/pwa-fix-2025
pwa fix 2025
2 parents 70f886c + 083c161 commit 64d42e3

File tree

3 files changed

+52
-9
lines changed

3 files changed

+52
-9
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
manifest.json provides metadata used when your web app is installed on a
1515
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1616
-->
17-
<link rel="manifest" href="./manifest.json" />
17+
<link rel="manifest" href="./manifest.webmanifest" />
1818
<!--
1919
Notice the use of %PUBLIC_URL% in the tags above.
2020
It will be replaced with the URL of the `public` folder during the build.

manifest.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
{
22
"short_name": "React Pipeline",
33
"name": "React Pipeline from Maifee Ul Asad",
4+
"description": "SPA using React + TS + Vite + Tailwind",
45
"icons": [
56
{
6-
"src": "./favicon.ico",
7+
"src": "favicon.ico",
78
"sizes": "64x64 32x32 24x24 16x16",
89
"type": "image/x-icon",
910
"purpose": "any"
1011
},
1112
{
12-
"src": "./logo144.png",
13+
"src": "logo144.png",
1314
"type": "image/png",
1415
"sizes": "144x144",
1516
"purpose": "any"
1617
},
1718
{
18-
"src": "./logo192.png",
19+
"src": "logo192.png",
1920
"type": "image/png",
2021
"sizes": "192x192",
21-
"purpose": "maskable"
22+
"purpose": "any maskable"
2223
},
2324
{
24-
"src": "./logo512.png",
25+
"src": "logo512.png",
2526
"type": "image/png",
2627
"sizes": "512x512",
27-
"purpose": "maskable"
28+
"purpose": "any maskable"
2829
}
2930
],
30-
"start_url": "./react-pipeline/",
31+
"start_url": "./",
32+
"scope": "./",
3133
"display": "standalone",
34+
"orientation": "portrait-primary",
3235
"theme_color": "#000000",
33-
"background_color": "#ffffff"
36+
"background_color": "#ffffff",
37+
"lang": "en",
38+
"categories": ["productivity", "utilities"]
3439
}

vite.config.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,45 @@ export default defineConfig({
3333
plugins: [
3434
react(),
3535
VitePWA({
36+
// todo: we need try to load from file later on
3637
registerType: 'autoUpdate',
38+
includeAssets: ['favicon.ico', 'logo144.png', 'logo192.png', 'logo512.png'],
39+
manifest: {
40+
name: 'React Pipeline from Maifee Ul Asad',
41+
short_name: 'React Pipeline',
42+
description: 'SPA using React + TS + Vite + Tailwind',
43+
theme_color: '#000000',
44+
background_color: '#ffffff',
45+
display: 'standalone',
46+
start_url: './',
47+
scope: './',
48+
icons: [
49+
{
50+
src: 'favicon.ico',
51+
sizes: '64x64 32x32 24x24 16x16',
52+
type: 'image/x-icon',
53+
purpose: 'any'
54+
},
55+
{
56+
src: 'logo144.png',
57+
type: 'image/png',
58+
sizes: '144x144',
59+
purpose: 'any'
60+
},
61+
{
62+
src: 'logo192.png',
63+
type: 'image/png',
64+
sizes: '192x192',
65+
purpose: 'any maskable'
66+
},
67+
{
68+
src: 'logo512.png',
69+
type: 'image/png',
70+
sizes: '512x512',
71+
purpose: 'any maskable'
72+
}
73+
]
74+
},
3775
workbox: {
3876
globPatterns: ['**/*.{html,js,css,png,jpg,svg,ico,json,woff2,ttf,mp4}'],
3977
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MB limit

0 commit comments

Comments
 (0)