File tree 5 files changed +2757
-2532
lines changed
5 files changed +2757
-2532
lines changed Original file line number Diff line number Diff line change 4
4
< meta charset ="utf-8 ">
5
5
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
6
< meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
7
+ < meta name ="theme-color " content ="#00142A ">
7
8
< link rel ="icon " href ="<%= BASE_URL %>favicon.ico ">
8
9
< title > sub-web</ title >
9
10
</ head >
Original file line number Diff line number Diff line change
1
+ {
2
+ "short_name" : " sub-web" ,
3
+ "name" : " sub-web" ,
4
+ "icon" : [
5
+ {
6
+ "src" : " ./img/icons/icon-192x192.png" ,
7
+ "sizes" : " 192x192" ,
8
+ "type" : " image/png"
9
+ },
10
+ {
11
+ "src" : " ./img/icons/android-chrome-512x512.png" ,
12
+ "sizes" : " 512x512" ,
13
+ "type" : " image/png"
14
+ }
15
+ ],
16
+ "start_url" : " index.html" ,
17
+ "display" : " standalone" ,
18
+ "background_color" : " #002140" ,
19
+ "theme_color" : " #002140"
20
+ }
Original file line number Diff line number Diff line change 3
3
import { register } from 'register-service-worker'
4
4
5
5
if ( process . env . NODE_ENV === 'production' ) {
6
- register ( `${ process . env . BASE_URL } service-worker .js` , {
6
+ register ( `${ process . env . BASE_URL } sub-web .js` , {
7
7
ready ( ) {
8
8
console . log (
9
9
'App is being served from cache by a service worker.\n' +
Original file line number Diff line number Diff line change @@ -30,5 +30,17 @@ module.exports = {
30
30
symbolId : 'icon-[name]'
31
31
} )
32
32
. end ( )
33
+ } ,
34
+
35
+ pwa : {
36
+ workboxOptions : {
37
+ // https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
38
+ skipWaiting : true ,
39
+ clientsClaim : true ,
40
+ importWorkboxFrom : 'local' ,
41
+ importsDirectory : 'js' ,
42
+ navigateFallback : '/' ,
43
+ navigateFallbackBlacklist : [ / \/ a p i \/ / ]
44
+ }
33
45
}
34
46
} ;
You can’t perform that action at this time.
0 commit comments