File tree Expand file tree Collapse file tree 6 files changed +28
-3
lines changed
src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp Expand file tree Collapse file tree 6 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 78
78
{
79
79
"condition" : " (!PWA)" ,
80
80
"exclude" : [
81
- " Client/wwwroot/service-worker*.js"
81
+ " Client/wwwroot/service-worker*.js" ,
82
+ " Client/wwwroot/manifest.json" ,
83
+ " Client/wwwroot/icon-512.png"
82
84
]
83
85
}
84
86
]
Original file line number Diff line number Diff line change 8
8
< base href ="/ " />
9
9
< link href ="css/bootstrap/bootstrap.min.css " rel ="stylesheet " />
10
10
< link href ="css/site.css " rel ="stylesheet " />
11
+ <!--#if PWA -->
12
+ < link href ="manifest.json " rel ="manifest " />
13
+ <!--#endif -->
11
14
</ head >
12
15
13
16
< body >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " BlazorWasm-CSharp" ,
3
+ "short_name" : " BlazorWasm-CSharp" ,
4
+ "start_url" : " /" ,
5
+ "display" : " standalone" ,
6
+ "background_color" : " #ffffff" ,
7
+ "theme_color" : " #03173d" ,
8
+ "icons" : [
9
+ {
10
+ "src" : " icon-512.png" ,
11
+ "type" : " image/png" ,
12
+ "sizes" : " 512x512"
13
+ }
14
+ ]
15
+ }
Original file line number Diff line number Diff line change 1
1
// See service-worker.published.js for the offline support logic.
2
- // This is not enabled in development as it would make development more difficult
3
- // (changes would not be reflected on the first load after each change).
2
+
3
+ // In development, always fetch from the network and do not enable offline support.
4
+ // This is because caching would make development more difficult (changes would not
5
+ // be reflected on the first load after each change).
6
+ self . addEventListener ( 'fetch' , ( ) => { } ) ;
Original file line number Diff line number Diff line change 7
7
8
8
const resourcesAvailableOffline = [
9
9
'index.html' ,
10
+ 'manifest.json' ,
11
+ 'icon-512.png' ,
10
12
'_framework/blazor.boot.json' ,
11
13
'_framework/blazor.webassembly.js' ,
12
14
'_framework/wasm/dotnet.js' ,
You can’t perform that action at this time.
0 commit comments